In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly talks about "what are the form methods in javascript". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn "what are the form methods in javascript"?
There are two built-in form methods in javascript: 1, reset (), which is used to reset all input elements of the form to their default values, and 2, submit (), which is used to submit form data to the Web server.
The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.
The Form object represents an HTML form.
Every time it appears in an HTML document, a Form object is created.
Form users are usually used to collect user data and contain input elements such as text fields, check boxes, checkboxes, submit buttons, and so on. Forms can also be called option menus, textarea, fieldset, legend, and label elements.
The form is used to send data to the server.
Methods for javascript form objects (form):
The method description reset () resets all input elements of the form to their default values. Submit () submits the form.
The reset () method of Form object
The reset () method resets the elements in the form to their default values.
Syntax: formObject.reset ()
Note: the result of calling this method is similar to that when the user clicks the Reset button, except that the form's event handle onreset will not be called.
Example:
Function formReset () {document.getElementById ("frm1") .reset ();
Enter some text in the input box below, and then press the reset form button to reset the form.
User name:
Secret code:
At this point, I believe you have a deeper understanding of "what are the form methods in javascript?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.