Jquery外掛程式easyUi表單驗證提交

來源:互聯網
上載者:User

標籤:

  1. <form id="myForm" method="post">  
  2.         <table align="center" style="width:400px;height:auto;margin-top: 20px">    
  3.             <tr>                                
  4.                 <td align="right">命令:</td>      
  5.                 <td><input id="cmd" name="cmd" style="width: 200px;" class="easyui-validatebox" required="true" validType="length[5,12]" missingMessage="不可為空"/></td>   
  6.             </tr>  
  7.             <tr>                
  8.                 <td align="right">描述:</td>  
  9.                  <td><input id="depict" name="depict" style="width: 200px;" class="easyui-validatebox" required="true" validType="length[5,12]" missingMessage="不可為空"/></td>   
  10.             </tr>  
  11.             <tr>                 
  12.                 <td align="right">類型:</td>                 
  13.                 <td><input id="type" style="width: 200px" class="easyui-validatebox"  
  14.                     url="data/editHealthCheckCombobox_data.json" valueField="id"  
  15.                     textField="text" /></td>   
  16.             </tr>   
  17.             <tr>  
  18.                 <td align="right">分數:</td>                 
  19.                 <td><input id="score" name="score" style="width: 200px" valueField="number"/></td>   
  20.             </tr>  
  21.             <tr>   
  22.                 <td align="right">使用狀況:</td>                 
  23.                 <td><input id="isUse" style="width: 200px" class="easyui-validatebox"/></td>   
  24.             </tr>   
  25.             <tr>   
  26.                 <td align="center" colspan="2">  
  27.                     <input type="submit"  value="提交"/>  
  28.                     <input type="reset" value="重設"/>  
  29.                 </td>                 
  30.             </tr>  
  31.         </table>  
  32.     </form>  

 

  1. //表單提交  
  2.     $(‘#myForm‘).form({  
  3.         url:‘/ProcessServlet‘,  
  4.         onSubmit:function(){  
  5.             return $(this).form(‘validate‘);  
  6.         },  
  7.         success:function(data){  
  8.             alert(data);  
  9.         }  
  10.     });   

http://blog.csdn.net/foart/article/details/7054139

Jquery外掛程式easyUi表單驗證提交

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.