报错Failed to execute 'send' on 'XMLHttpRequest': Failed to load

作妖的程序员 2020-10-12 10:19:52
function jylogInfo(username,password){
//debugger;
var urlre = "http://127.0.0.1:2315/framework/ws/plkslx/lxxtjk/loginuser/loginJY/arg0/"+username+"/arg1/"+password

var xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",urlre,false);
xmlhttp.send();
var res = xmlhttp.responseXML.getElementsByTagName("ns1:loginJYResponse")[0].innerHTML;
if(res=="success"){
return true;
}else{
alert(res);
return false;
}
}



需要获取返回内容 只能使用true。怎么办?
用的360浏览器,极速模式。
...全文
18497 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
记得res下 返回的是code, result

楼主你console。log(res ); 看看结构 估计就了解了
作妖的程序员 2020-10-12
  • 打赏
  • 举报
回复
写错了 。只能使用false

8,909

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧