is the submit button only a buttons or input tag?

Source: Internet
Author: User
Keywords Php
Because of the style of the problem I want to give a a tag to the submit button to set a type for it is submit, but found that the failure to commit failed to submit a few times can only be a button tag or the input tag to submit success is not the submit button only these two? Is there any other way?

I'm talking about PHP, not JS, not the click events, but the submitted data.

Reply content:

Because of the style of the problem I want to give a a tag to the submit button to set a type for it is submit, but found that the failure to commit failed to submit a few times can only be a button tag or the input tag to submit success is not the submit button only these two? Is there any other way?

I'm talking about PHP, not JS, not the click events, but the submitted data.

click me!

The Javascript,form object has a Submit method.

You can use other tags to simulate the submit button, such as the A tag you mentioned here.

If the other tags are simulated, you need to handle the events yourself, such as click events, submit events.

Click events can be a good simulation of the Submit event, you can take the hidden input type= "submit" way to trigger.

If you do not use JS, then only the input type=submit and button Type=submit these two methods,
If you use JS, no matter what element you can

With JavaScript, the DIV can be submitted.

Submission is for the form, as to how to trigger this commit to see JS

  • Related Article

    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.