Suppose you are writing an anonymous JavaScript function tha…

Suppose you are writing an anonymous JavaScript function that will run when your web page loads, and you want to include a statement that will cause a selection list in a web form to become active and ready for data entry. Which method should you apply in this statement?

Suppose you are examining the script for the orderForm web f…

Suppose you are examining the script for the orderForm web form, whose submit button has the id submitButton. The form includes option buttons for choosing a pizza sauce flavor. The following JavaScript code included in the script will check for a sauce selection when the user clicks the submit button and display a custom error message if a sauce was not chosen. ​ let submitButton = document.getElementById(“submitButton”); submitButton.addEventListener(“click”, validateSauce); function validateSauce() {    let sauce = document.forms.orderForm.elements.sauceType;    if (sauce.validity.valueMissing) {       sauce.setCustomValidity(“”);    } else {       sauce.setCustomValidity(“Choose a sauce, please”);    } }