开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜