Which attribute will allow the function checkPhoneNumber() to run when the user submits the form?
onClick= "return checkPhoneNumber()"
onsubmit= "return checkPhoneNumber()"
onClick= "checkPhoneNumber()"
onsubmit= "checkPhoneNumber()"
3 answers
onsubmit= "return checkPhoneNumber()"
are you very sure
Yes, I am sure. The "onsubmit" attribute specifies a JavaScript function to run when the form is submitted. So in this case, using "onsubmit= 'return checkPhoneNumber()'" will allow the function checkPhoneNumber() to run when the user submits the form.