Js submission form

Source: Internet
Author: User

1.doc ument. forms. from. submit ();
Document. form. sumbit ();
Document. form. submit. click ();
This. form. submit ();
The above forms of js form submission do not work in the firefox browser.
2. w3c standards must be followed:
1) Use the getElementById () method to obtain the form.
2). submit the form using the. submit () method
3) The name/id of the button cannot be named "submit"
4) The name/id of all components (buttons, text boxes, etc.) in form cannot be named "submit"

# When the name or id of the submit button is submit, an error is reported when the form is submitted in js and the form name. submit (), prompting that the object does not support this attribute or method.
The solution is to modify the name or id of the submit button and do not have the same name as the submit or action.
So why does js report an error when the name or id of the submit button is submit or action? Is this a bug?
Please advise the experts ....

! Because "form name. the submit () Commit statement does not comply with W3C standards. In IE, no error is reported because IE supports this method, but if it is in FF, an error is reported, to be written as "document. getElementById ('form id '). submit?

# I found <input type = "submit"/> and
The results are very different. Can someone tell me the differences between the two?
How can I replace the original submit button with images?

! <Input type = "submit"/> indicates a button, which is a submit button. When you click it, it automatically submits the form in which it is located.

Author: "fish bones"
 

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.