{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

javascript reciatation notes

javascript reciatation notes - var priceofpizza =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
<html> <body> <script type="text/javascript"> document.write( "<p>" + date() + "</p>" ); ---> shows the time </script> </body> </html> set up a variable and replace it with it var time; time = Date(); document.write( "<p>" + time + "</p>" ); ---> shows the time prompt(" how many pizza did you order?"); ---. pop out window var numbofpizza = prompt (" how many pizza did you order?")--> set variable document,write ("<p> you order" + numofpizza + " pizza. </p>"); ----> substitute varibale
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: var priceofpizza = prompt (" what is the price for each pizza? "); document,write ("<p> price of each pizza is" + priceofpizza + " . </p>"); var cost = numberofpizza * priceofpizza; document,write ("<p> the total cost is" + cost + " . </p>"); ---> calculate the cost alert(" the total cost is " + cost + ".");---> pop out alert var isok = confirm(:the total cost is " + cost + "."); document,write ("<p> the user's action is " + isok + " . </p>");...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online