Title: Oct 310:53 AM (1 of 24)
One of thehomeworkproblems.
Title: Oct 311:08 AM (2 of 24)
First JavaScript example.
Title: Oct 311:10 AM (3 of 24)
Title: Oct 311:10 AM (4 of 24)
I am using Firefox.I right click on the screen and select View Page Sourceto view the code.
Title: Oct 311:11 AM (5 of 24)
Title: Oct 311:14 AM (6 of 24)
Then the next prompt comes upand asks for the second number.Then the answer is calculated anddisplayed.
Title: Oct 311:16 AM (7 of 24)
The output is displayed througha document.write.
Title: Oct 311:17 AM (8 of 24)
Title: Oct 311:21 AM (9 of 24)
Title: Oct 311:23 AM (10 of 24)
I copied the code to notepad andI am now going to save it asmult1.html.
Title: Oct 311:24 AM (11 of 24)
right click and choose menu barand you get the menu bar inFirefox.You can then use File/Open toopen multi1.html.
Title: Oct 311:27 AM (12 of 24)
Title: Oct 311:30 AM (13 of 24)
Title: Oct 311:41 AM (14 of 24)
<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 311:42 AM (15 of 24)
I entered abc for firstnum and7 for secondnum.The concatenate puts themtogether as one.The add caused by parseFloatgives NaN.
Title: Oct 311:43 AM (16 of 24)
Title: Oct 311:46 AM (17 of 24)
Title: Oct 311:53 AM (18 of 24)
Title: Oct 311:55 AM (19 of 24)
Title: Oct 311:56 AM (20 of 24)
Put the divide question here.
Title: Oct 311:58 AM (21 of 24)
Title: Oct 312:00 PM (22 of 24)
This will potentially show errors that occur.
Title: Oct 312:12 PM (23 of 24)
Extra credit if you write this codeand pass it in before class.
Title: Oct 31:23 PM (24 of 24)