Web Technology207910 marksEvent Handling and Form Validation
Create an HTML file containing form elements textbox for username, password field and a checkbox for hobbies. Now write javascript function for the form validation. You should validate for username to be empty, password should be of length at least 5, and the check box should be checked.
Create an HTML file containing form elements textbox for username, password field and a checkbox for hobbies. Now write javascript function for the form validation. You should validate for username to be empty, password should be of length at least 5, and the check box should be checked.[10]
--- Element Type Purpose --------- <input type="text" Text box Accepts username input <input type="password" Password field Accepts password (masked) <input type="checkbox" Checkbox Allows hobby selection onsubmit="return validate()" Event handler Calls validation before submit Note: The onsubmit...