2081 2

Web Technology208110 marksEvent Handling and Form Validation

Create an HTML file containing form with textbox, select and radio button. Now write a javascript function for validating the form elements. Validate textbox for required, select field should have some value selected and radio button should be checked.

Create an HTML file containing form with textbox, select and radio button. Now write a javascript function for validating the form elements. Validate textbox for required, select field should have some value selected and radio button should be checked.[10]

--- - The <form tag uses the onsubmit event handler to call validateForm(). - Returning false from the function prevents form submission if validation fails. - Checks that the textbox is not empty (required field). - The default option has value="", so if nothing is selected, validation fails. - ...

Up nextWrite a PHP program to create a form. Create an insertdb() method to insert the form value