首页 >后端开发 >php教程 >Jquery应验表单

Jquery应验表单

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-13 11:07:22751浏览

Jquery验证表单
<script>assets/js/jquery.js"></script>
<script>assets/js/jquery.validate.js"></script>
<script><br />$.validator.setDefaults({<br /> submitHandler: function() { alert("submitted!" ; website.submit(););<br /> }<br />});<br />$(document).ready(function() {<br /> // validate the website form when it is submitted<br /> //$("#website").validate();<br /> <br /> $("#website").validate({<br /> rules: {<br /> companytheme: "required"<br /> },<br /> messages: {<br /> companytheme: "This field is required."<br /> }<br /> });<br />});<br /></script>


admin/insert_website" method="post" id="website" >
    
    
    
    
    




    
Company Theme:   
 
  


    


------解决方案--------------------
$.validator.setDefaults({
submitHandler: function() { alert("submitted!" ; website.submit(););
}
});

出掉试下
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn