Form form cannot submit JS dynamically added form element problem:

Source: Internet
Author: User

In the first case, this situation JS dynamically added form elements are not submitted to the server side of the

<table>

<form method= "post" action= "url" >

<tr><td></td><td></td></tr>

<tr><td></td><td></td></tr>

</form>

</table>

In the second case, the JS dynamically added form element can be submitted to the server side

<form method= "post" action= "url" >

<table>

<tr><td></td><td></td></tr>

<tr><td></td><td></td></tr>

</table>

</form>

Summary: To ensure the integrity of the form, and it placed the integrity of the target HTML tag, for example: The table above can not use the form tag to separate table and table TR node.

The only way to add JS dynamically to the form element is to submit it to the server.

If you divide the integrity of the label. You can open, Googlei browser development tools. See if the tag you added dynamically with JS is included in the form tag.

Form form cannot submit JS dynamically added form element problem:

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.