A server for a popular website experiences significant slowdowns when users submit forms with incorrect data. To improve performance, the
developer would like to validate the form data on the client side before any of it is sent to the server. To accomplish this, they create an onClick
event handler on the button with a value of "ValidateText(this form)". The developer would like to test that the script is reading the correct data. Which
line of code will allow them to view the data in a text input named "lastName" to validate the text?
A. function onClick(form) { alert(lastName); }
B. function validate Text(form1) { alert(form1.lastName.value); }
C.
O D.
function onClick(form1) { alert(form1.lastName); }
function validateText(this.form1) { alert(this.form.lastName.value); }
O E. function validate Text(this.form) { alert(lastName); }