jQuery validate 設置失去焦點就校驗和失去焦點就表單校驗是否通過


js部分

 

html部分

 

自定義樣式:

    /*自定義validate覆蓋掉了 validate 里面默認的顯示樣式*/
    label.error{ 
    background:url(${pageContext.request.contextPath }/images/unchecked.gif) no-repeat 10px 3px; /* no-repeat 背景圖片不填充*/
        padding-left: 30px;
        font-family:georgia;
        font-size: 15px;
        font-style: normal;
        color: red;
    } 
    
    label.success{
        background:url(${pageContext.request.contextPath }/images/checked.gif) no-repeat 10px 3px;
        padding-left: 30px;
    }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM