zoukankan      html  css  js  c++  java
  • Jquery插件easyUi表单验证提交

    1. <form id="myForm" method="post">  
    2.         <table align="center" style="400px;height:auto;margin-top: 20px">    
    3.             <tr>                                
    4.                 <td align="right">命令:</td>      
    5.                 <td><input id="cmd" name="cmd" style=" 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=" 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=" 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=" 200px" valueField="number"/></td>   
    20.             </tr>  
    21.             <tr>   
    22.                 <td align="right">使用状况:</td>                 
    23.                 <td><input id="isUse" style=" 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

  • 相关阅读:
    AC自动机 [模板]
    ChonSu [ZOJ 2684]
    Quad Tiling [POJ 3420]
    LCA 最近公共祖先 [POJ 1330]
    强连通分量[trajan]
    高斯消元 [模板]
    01K Code [HDU 1545]
    Cycle Game [ZOJ 2686]
    清除Eclipse中的内置浏览器中的历史记录(REF)
    第三方的 NET 数据库连接提供者,Lightswitch
  • 原文地址:https://www.cnblogs.com/zkwarrior/p/4832784.html
Copyright © 2011-2022 走看看