submitHandler doesn't work
The following code doesn't work.
$(document).ready(function(){
$("#digitalchange").validate(
{
rules: {
addbalance: {
digits:true,
min:20,
max:1000
},
addquota: {
digits:true,
min:5,
max:1000
}
},
subm开发者_StackOverflow社区itHandler: function(){
var var1=$("#addbalance").val();
alert(var1);
}
messages: {
}
});
});
However, after I remove
submitHandler: function(){
var var1=$("#addbalance").val();
alert(var1);
}
, the remaining code works. What's wrong?
You're missing a comma after the closing } of the submitHandler value function?
should you have a comma after the sumbitHandler declaration?
精彩评论