我需要在原型中编写这个jquery函数。我该如何转换它?
submitHandler: function(form) {
$.post("post.php?"+$("#form1").serialize(), {
}, function(response){
if(response==0)
{
alert("security code is wrong!");
return false;
}
}
);
},
答案 0 :(得分: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;
}
}
});