2012-07-30 3 views
0

프로토 타입에이 jquery 함수를 작성해야합니다. 어떻게 변환 할 수 있습니까?프로토 타입으로 제출

submitHandler: function(form) {            
    $.post("post.php?"+$("#form1").serialize(), {  
     }, function(response){               

      if(response==0) 
       {              
        alert("security code is wrong!"); 
        return false; 
       }             
      } 
    ); 

},

답변

1

시도 :

new Ajax.Request('post.php?' + $('form1').serialize(), { 
    onSuccess: function (transport) { 
    var response = transport.responseText; 

    if (response == 0) {              
     alert("security code is wrong!"); 
     return false; 
    } 
    } 
}); 
관련 문제