加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

mui.ajax 如何调用webservice

发布时间:2020-12-16 01:57:28 所属栏目:百科 来源:网络整理
导读:document.getElementById(quot;confirmquot;).addEventListener('tap',function() { var respnoseEl = document.getElementById(quot;responsequot;); respnoseEl.innerHTML = '正在请求中...'; mui.ajax('http://192.168.0.79:8080/SMSService.asmx/Request


document.getElementById("confirm").addEventListener('tap',function() {
var respnoseEl = document.getElementById("response");
respnoseEl.innerHTML = '正在请求中...';
mui.ajax('http://192.168.0.79:8080/SMSService.asmx/Request',{
data: {
'_arg0: username',
'_agr1: password'
},213)">dataType: 'json',//服务器返回json格式数据
type: 'post',//HTTP请求类型
timeout: 10000,//超时时间设置为10秒;
success: function(data) {
//服务器返回响应,根据响应结果,分析是否登录成功;
respnoseEl.innerHTML = 'w...';
error: function(xhr,type,errorThrown) {
//异常处理;
debugger
respnoseEl.innerHTML = xhr.statusText+'**'+errorThrown;
console.log(type);
}
});

})(mui);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读