0
假設我有兩個文本字段t1和t2,當輸入T1時,我們需要刪除 對t2的驗證,當輸入T2時,我們需要刪除對於T1當我輸入任意一個字段時,如何刪除jQuery中的驗證
蔭使用addClass()和removeClass()方法
if($("input:text").val()!=''){
$("#txt1").attr('class','validate[optional] ');
$("#txt2").attr('class','validate[optional] ');
}
但我的問題是,當我在 「TXT2」 進入仍然是 「txt1中」 被要求進行驗證和反向工作
尼克:它說對象不列入支持此屬性或方法 – Someone 2010-11-02 14:19:02
@Someone - 這驗證插件您使用的? – 2010-11-02 14:21:10
http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/ – Someone 2010-11-02 14:23:51