ajax访问webservice接口
来源:互联网 发布:产品设计的软件 编辑:程序博客网 时间:2024/06/05 06:21
1.使用mui框架的ajax请求
mui.ajax('http://192.168.100.93:8080/oaWebService/standardService/app/getAuditMsg', { //webservice接口中方法需要的参数 data: { arg0: 'mpp', arg1: 'e6e061838856bf47e1de730719fb2609' }, type: 'get', //HTTP请求类型 //强制跨域 dataType: 'jsonp', //服务器返回json格式数据 jsonp: "json", crossDomain: true, timeout: 10000, //超时时间设置为10秒; //headers: { 'Content-Type': 'application/json' }, success: function(data) { }, error: function(xhr, type, errorThrown) { //异常处理; console.log(xhr); console.log(type); console.log(errorThrown); mui.alert(type); } });
2.正常标准的ajax
$.ajax({ type: "post", url: "http://192.168.100.93:8080/oaWebService/standardService/app/getAuditMsg", dataType: "jsonp", jsonp: "json", data: { arg0: 'mpp', arg1: 'e6e061838856bf47e1de730719fb2609' }, success: function(result) { console.log("data from service :" + result); }, error: function(a, b, c) { alert(c); } });
阅读全文
0 0
- ajax访问webservice接口
- AJAX访问WebService
- Ajax访问WebService(不跨域)
- Ajax访问WebService(跨域)
- java访问WebService接口
- Python访问WebService接口
- Jquery.ajax()访问接口
- js ajax 访问 axis2 webservice
- Jquery Ajax方式访问WebService
- Javascript AJAX访问C#webservice
- ajax跨域访问webservice
- mui ajax 访问 java webservice
- java访问C#webservice接口
- Ajax访问/跨域访问WebService服务
- MUi 框架ajax请求WebService接口
- ajax跨域请求调用webservice接口
- Ajax.Net访问WebService的客户端编程
- 学习ajax(四)(从客户端访问WebService)
- pat:1038. 统计同成绩学生(20)
- Map版电话本
- 设置AFN的数据解析类型
- 第一章 正则表达式字符匹配攻略
- Python+Tornado+Nginx服务器部署解决方案
- ajax访问webservice接口
- 九度1064:反序数
- 系统输入输出
- Shiro 权限管理filterChainDefinitions过滤器配置
- 新建连接失败-
- 数据结构实验之排序五:归并求逆序数
- js如何取A标签中的是值
- HPU1389--梦想从A+B开始(输出,注意特殊符号的输出)
- ReactNative 开发工具Webstorm 环境配置