2011-06-08 72 views

回答

0

綁定一個事件給這個錨的點擊與此:

$("#field_id_you_want_to_validate").validate({ 
    rules: { 
    required: true 
    } 
}) 
0

比方說您有ID爲「myAnchor」主播。這就是我寫的代碼

$("#myAnchor").click(function(){ 
// Validate the Textbox that you want 

$("#textboxid").attr('class', 'required'); 

});