随笔分类 -  ajax

摘要:php后台代码: jsonp跨域请求响应头: 也是跨域,表单提交 成功案例 阅读全文
posted @ 2019-10-29 09:34 yuan9580 阅读(200) 评论(0) 推荐(0)
摘要:success:function(res){ res=res.replace(/\s/g,''); alert(res);} 阅读全文
posted @ 2019-10-22 14:28 yuan9580 阅读(437) 评论(0) 推荐(0)
摘要:H5开发中使用ajax调用数据接口, 如果接口文件不在同域名下会提示跨域错误(No 'Access-Control-Allow-Origin' header is present on the requested resource.)。 1.兼容IE浏览器的方法,在Ajax请求的时候使用jsonp: 阅读全文
posted @ 2019-08-13 09:38 yuan9580 阅读(155) 评论(0) 推荐(0)