1. Error description
2. Cause of Error
$.ajax ({ type: "Post", URL: "/user/queryuserinfo", dataType: "JSON", data:{ "userId": $ ("# UserID "). Val (), " num ": num, " type ": $ (" #type "). Val () }, success:function (resp) { }});
error occurred in query request because NUM is undefined
3. Solutions
var num = 0;if ($ ("#type"). val () = = "1") { num = $ ("#num"). Val (); else{ num = 0;} $.ajax ({ type: "Post", URL: "/user/queryuserinfo", dataType: "JSON", data:{ "userId": $ ("# UserID "). Val (), " num ": num, " type ": $ (" #type "). Val () }, success:function (resp) { }});
Initialize and assign a value before using NUM to prevent an uninitialized result of an error
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
TypeError: ' Stepup ' called on a object that does not implement interface htmlinputelement.