How to work with forms in javascript
The form object supports only two methods: submit () and reset (). The first method initiates the submission of the form to the web server, the second - resets the form. Accordingly, there are two events - onsumbit and onreset. The first occurs when sending form data, the second - when a form is reset.