首页 > 应用开发 > > ajax 不能进后台
"SyntaxError: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL" 这个是谷歌调试看到的异常
以下是我的ajax代码
··$.ajax({
method:"post",
type:"POST",
url: ":8080/skproject/SysLocationInfoController/testEntityData.json",
data:{"sysUserInfo.user_nm":username, "sysUserInfo.pwd":password},
datatype:"json",
success:function(data){
alert("成功了");
},
error:function(error){
alert(error);
}
}); ··
注:我的URL贴到浏览器里可以正常工作进后台。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3034/viewspace-3127308/ ,如需转载,请注明出处,否则将追究法律责任。