When the userName field of the login web form contains inval…

When the userName field of the login web form contains invalid data entered by the user, both of the following JavaScript commands will return false: Command 1: document.forms.login.elements.userName.checkValidity() Command 2: document.forms.login.checkValidity()

What JavaScript statements should you place in the blank in…

What JavaScript statements should you place in the blank in order to retrieve the value of the user’s selection from the sauceFlavor drop-down menu in your web form and assign it to the sauceValue variable? let orderForm = document.forms.orderForm; let sauceFlavor = orderForm.elements.sauceFlavor;

Imagine that you are working on a web form. After writing th…

Imagine that you are working on a web form. After writing the JavaScript statement let pinNo = document.getElementById(“pinNo”); what statement can you add to assign a Boolean value of true to isValid if the value in the pinNo field is matched by the regular expression /^\d{4}$/ or assign a value of false to isValid if it isn’t?