What should you do?

Posted by: Pdfprep Category: 98-382 Tags: , ,

You are creating a web page that allows customers to choose how hot their spice is. If they choose spicy, a warning should be displayed.

You create the following form. Line numbers are included for reference only.

You create the following JavaScript code to display the warning.

When you choose spicy and click Order, the warning fails to display.

You need to solve this problem.

What should you do?
A . Change line 07 to <button onchange = “checkWarning();”>Order</button>
B . Change line 07 to <button onclick = “checkWarning;”>Order</button>
C . Change line 10 to var option.value = document.forms.orderForm[“heatIndex”];
D . Change line 10 to var option = document.forms.orderForm[“heatIndex”].value;

Answer: D

Explanation:

Explanation: https://www.w3schools.com/jsref/coll_doc_forms.asp

Leave a Reply

Your email address will not be published.