In javascript, press enter to submit the form code.

Source: Internet
Author: User
Tip: you can modify some code before running

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><ptml><pead><meta http-equiv="Content-Type" content="text/html; charset=GBK"><title>Submit</title></pead><body><p>This demo shows whether to trigger the submit form by pressing enter in the text box.</p><p>By default, a text box is submitted, regardless of whether the button type is submit or button</p><form action=""><input type="text"><input type="button" value="提交"></form><p>How can I not submit a text box by adding a hidden text box?</p><form action=""><input type="text"><input type="text" ><input type="button" value="提交"></form><p>As long as a button with the type of submit exists, one text box or multiple text boxes are submitted</p><form action=""><input type="text"><input type="submit" value="提交"></form><p>As long as a button with the type of submit exists, one text box or multiple text boxes are submitted</p><form action=""><input type="text"><input type="text"><input type="submit" value="提交"></form><p>If you do not submit multiple text boxes, use the button with the type of button.</p><form action=""><input type="text"><input type="text"><input type="button" value="提交"></form><p>When the button element is used, FX and IE have different performances.</p><form action=""><input type="text"><input type="text"><button>Submit</button></form><p>Radio and checkbox will also trigger the submission form in FX, not in IE</p><form action=""><input type="text"><input type="radio" name="a"><input type="checkbox" name="b"><input type="checkbox" name="c"><input type="button" value="提交"></form><p>A button whose type is image is equivalent to a button whose type is submit.</p><form action=""><input type="text"><input type="text"><input src="/common/logo_yahookoubei_s.gif"></form></body></ptml></td> </tr></table>
Tip: you can modify some code before running

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.