+ All Categories
Home > Documents > Title: Oct 310:53 AM (1 of 24) - Bristol Community...

Title: Oct 310:53 AM (1 of 24) - Bristol Community...

Date post: 16-Oct-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
24
Title: Oct 310:53 AM (1 of 24)
Transcript
Page 1: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­10:53 AM (1 of 24)

Page 2: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

One of thehomeworkproblems.

Title: Oct 3­11:08 AM (2 of 24)

Page 3: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

First JavaScript example.

Title: Oct 3­11:10 AM (3 of 24)

Page 4: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:10 AM (4 of 24)

Page 5: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

I am using Firefox.I right click on the screen and select View Page Sourceto view the code.

Title: Oct 3­11:11 AM (5 of 24)

Page 6: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:14 AM (6 of 24)

Page 7: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Then the next prompt comes upand asks for the second number.Then the answer is calculated anddisplayed.

Title: Oct 3­11:16 AM (7 of 24)

Page 8: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

The output is displayed througha document.write.

Title: Oct 3­11:17 AM (8 of 24)

Page 9: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:21 AM (9 of 24)

Page 10: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:23 AM (10 of 24)

Page 11: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

I copied the code to notepad andI am now going to save it asmult1.html.

Title: Oct 3­11:24 AM (11 of 24)

Page 12: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

right click and choose menu barand you get the menu bar inFirefox.You can then use File/Open toopen multi1.html.

Title: Oct 3­11:27 AM (12 of 24)

Page 13: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:30 AM (13 of 24)

Page 14: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:41 AM (14 of 24)

Page 15: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

<br> will go down to the browser and cause it to moveto the next line ­ like hitting Enter.  This is two waysto do the <br> once within its own quotes and oncewith the <br> put in an existing literal.

Title: Oct 3­11:42 AM (15 of 24)

Page 16: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

I entered abc for firstnum and7 for secondnum.The concatenate puts themtogether as one.The add caused by parseFloatgives NaN.

Title: Oct 3­11:43 AM (16 of 24)

Page 17: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:46 AM (17 of 24)

Page 18: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:53 AM (18 of 24)

Page 19: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:55 AM (19 of 24)

Page 20: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­11:56 AM (20 of 24)

Page 21: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Put the divide question here.

Title: Oct 3­11:58 AM (21 of 24)

Page 22: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Title: Oct 3­12:00 PM (22 of 24)

Page 23: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

This will potentially show errors that occur.

Title: Oct 3­12:12 PM (23 of 24)

Page 24: Title: Oct 310:53 AM (1 of 24) - Bristol Community Collegecisweb.bristolcc.edu/.../CIS120/c12011Oct319.pdf · 2019. 10. 3. · homework problems. Title: Oct 311:08 AM (2 of 24) First

Extra credit if you write this codeand pass it in before class.

Title: Oct 3­1:23 PM (24 of 24)


Recommended