Create webpage by Java Scripts ,In the script, use prompt methods to collect thr
ID: 3659283 • Letter: C
Question
Create webpage by Java Scripts ,In the script, use prompt methods to collect three numbers from the user. Then, use alert methods to display the sum and the product of the three numbers. Note what happens if one or more of the inputs is not a number. Try to explain this behavior. Submit your page to the W3C Validator (http://validator.w3.org/) and correct all errors. Calculating a Table : create a new table in your website. Complete the XHTML code for the head and create a shell for the body. Write an appropriate headline and introductory paragraph and also the XHTML for the table and its header row. Link to this newly created page from your home page.In place of the data rows for the table, write aExplanation / Answer
seems like you don't provide enough information for table creation. I could only provide you the first part of code. Hope it helps you :P var num1 = prompt("Please enter your first number"); var num2 = prompt("Please enter your second number"); var num3 = prompt("please enter your third number"); if(isNaN(num1)||isNaN(num2)||isNaN(num3)){ alert("one or more inputs are not number!" }else{ alert("Sum is: " + (num1+num2+num3)); alert("Product is: " + (num1*num2*num3)); }
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.