Computer Science, asked by hfabcjbh4369, 11 months ago

What are the method available in form submitting?

Answers

Answered by Rajeshkumare
0
The submit event triggers when the form is submitted, it is usually used to validate the form before sending it to the server or to abort the submission and process it in JavaScript.

The method form.submit() allows to initiate form sending from JavaScript. We can use it to dynamically create and send our own forms to server.

Let’s see more details of them.



There are two main ways to submit a form:

The first – to click <input type="submit"> or <input type="image">.

The second – press Enter on an input field.

Both actions lead to submit event on the form. The handler can check the data, and if there are errors, show them and call event.preventDefault(), then the form won’t be sent to the server.

In the form below:

Go into the text field and press Enter.

Click <input type="submit">.

Both actions show alert and the form is not sent anywhere due to return false:

Answered by prakashsatya10
0

The two methods which are available for form submitting are:-

GET & POST.

The main difference between these methods are that data posted by the GET method is displayed in the browsers address bar.

But data posted by POST method is not displayed in the browsers address filed.

plz mark as brainliest

Similar questions