乔军
乔军
  • 发布:2019-03-12 21:40
  • 更新:2019-03-12 21:40
  • 阅读:913

xhr IOS端接受不到服务器返回值,安卓端正常,IOS执行到onreeor里面

分类:HTML5+
xhr

发现只是中文不能提交,英文和数字没问题,但是安卓端正常
var xhr1 = new plus.net.XMLHttpRequest();
xhr1.open("GET", apiurl + "SaveComment?id=" + id + "&commentcontent=" + commentcontent + "&type=article" + "&contentid=" + contentid);
xhr1.send();
//alert();
//alert(xhr1.readyState);
xhr1.onerror=function(e){
alert(e.lengthComputable);
};
xhr1.onload = function() {
var res = xhr1.responseText;
//alert(res)
if(res == "评论成功") {
mui.toast(res);
document.getElementById('comshow').style.display = 'block';
document.getElementById('comhide').style.display = 'none';
location.reload();
} else {
mui.toast(res);
}
};

2019-03-12 21:40 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复