Learn how to submit two forms of form form in Java front end

Source: Internet
Author: User
Tags button type

First type: Native mode

Note: The button tag has a style of submit

<form action="/trans/doTrans.do" method="post">    转出卡号:${cardNo}    <br>    转出卡号余额:${balance}元    <br> <br>    转入卡号:<input name="checkInCardNo" type="text">    <br>    转入卡号姓名:<input name="realName" type="text">    <br>    转出金额:<input name="money" type="text">    <br>    <button type="submit">确定转出</button></form>
The second type: jquery check mode

Note: The button label has a style of button
Process: Click Submit, First trigger the SubmitForm () method, execute the checksum ID selector, and finally submit form form.

  <script type= "Text/javascript" > Function SubmitForm () {if ($ ("#t_in_cardNo"). Val (). length!=8) { Alert ("You have entered the wrong number of cards!")        ") return; } $ ("#transForm"). Submit ();<!--Here is the Submit method--} </script>  
<form id= "TransForm" class= "Am-form am-form-horizontal" action= "/trans/dotrans.do" method= "POST" > <div class = "Am-form-group" > <label class= "am-u-sm-3 Am-form-label" > Ext card number </label> <div class= "am-u-sm- 9 "> <input type=" text "id=" T_cardno "readonly placeholder=${cardno}> </div> &LT;/DIV&G    T <div class= "Am-form-group" > <label class= "am-u-sm-3 Am-form-label" > Transfer card number </label> &LT;DIV cl                   ass= "am-u-sm-9" > <input type= "text" id= "T_in_cardno" pattern= "[0-9]*" placeholder= "Please enter 8-digit offset card number" Name= "Checkincardno" > </div> </div> <div class= "Am-form-group" > <label class= "am-u-sm-3 Am-form-label" > Transfer amount </label> <div class= "am-u-sm-9" > <input type= "text "Id=" T_money "placeholder=" Enter the transfer amount "name=" Money "> </div> </div> <div class=" Am-form-group "&        Gt <div Class= "Am-u-sm-9 am-u-sm-push-3" > <button type= "button" onclick= "SubmitForm ()" class= "Am-btn Am-btn-primar Y "> Submit </button><!--Here for the submission type button--> </div> </div></form>

Learn how to submit two forms of form form in Java front end

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.