New understanding of Form form Reset method

Source: Internet
Author: User
Tags html form reset

The Reset method of the form form in HTML is used to empty the user's input, always mistakenly thinking that it is simply to empty the values in the input and so on.

The Reset method of the form form in HTML is used to empty the user's input, always mistakenly thinking that it is simply to empty the values in the input and so on.

But that's not true, the essence of the Reset method is to restore the contents of input items such as input to values in property value instead of "" Null values.

This is what the world's consortium says:

In an HTML formEach time the label appears, a Reset object is created.

When the reset button is clicked, the values of all input elements in the form containing it are reset to their default values. The default value is specified by the HTML Value property or the DefaultValue property of JavaScript.

In reality, we often need to edit a certain content when the form reset, but this time input and other inputs of the value attribute may have been given a value, so reset just let the form initialized to this value.

In this case, we can only use JavaScript to set input, such as the value of inputs to NULL to achieve the reset effect.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.