The form tag is defined as follows:
<form onsubmit="return Validate()" action="http://www.mysite.com/">
How will you implement the Validate() function that will stop the form from being submitted if the name field on the form is not filled?
Correct Answer: <script type="text/javascript"> function Validate() { if(document.forms[0].name.value == "") return false; else return true; } </script>
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More DHTML MCQ Questions