mui调用webservice
2016-05-25 22:13
381 查看
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'
},
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);
var respnoseEl = document.getElementById("response");
respnoseEl.innerHTML = '正在请求中...';
mui.ajax('http://192.168.0.79:8080/SMSService.asmx/Request', {
data: {
'_arg0: username',
'_agr1: password'
},
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);
相关文章推荐
- iOS开发之高级视图—— UITableView的简化操作——UITableViewController
- 【一天一道LeetCode】#62. Unique Paths
- 【一天一道LeetCode】#62. Unique Paths
- The requested list key '#request.localprovi' could not be resolved as a collection/array/map/enumera
- UESTC 686 BFS
- LOCAL_REQUIRED_MODULES 在apk的使用
- UESTC 75 The Queen's New Necklaces
- iOS开发之高级视图—— UITableView操作——移动
- squirrel-sql通过phoenix-4.7.0连接windows中的hbase-1.1.3(一)
- 安卓学习记录-Android-day19-UI学习2
- [QS] 同一个UI多个拥有右键菜单功能及数据拖动功能的Datagrid出现的假死问题
- ThreadLocal 与 Request 和 Session 之关联
- iOS开发之高级视图—— UITableView操作——删除
- (绝对有用)iOS获取UUID,并使用keychain存储(转载)
- C#中的String,StringBuilder 常用方法总结
- android stuio中布局预览错误解决方法
- Android UI开发第三十篇——使用Fragment构建灵活的桌面
- iOS开发之高级视图—— UITableView操作——新增
- Codeforces 612C Replace To Make Regular Bracket Sequence
- POJ 2478 Farey Sequence