以下代码提交不会出错,但是服务器无法接收传递的参数 userid 及 usercode,也就是 response.asp 可以正常运行,只是 response("userid") 与 response("usercode") 都是 NULL。请问哪里出错了?
function NewProgram() {
$.ajax({
url: 'response.asp',
type: 'post',
async: false,
dataType: 'text',
timeout: 5000,
data: "{'userid':11,'usercode':12}",
error: function() {
alert('连线中断,请刷新页面重新连接');
},
success: function(data) { //正常返回时执行的方法
userno = users.length;
}
});
}