Home >Backend Development >PHP Tutorial > Jquery应验表单

Jquery应验表单

WBOY
WBOYOriginal
2016-06-13 13:01:34798browse

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(););
}
});

出掉试下
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn