JSONP详解(四)JSONP跨域访问

1.通过脚本访问json文件 <script type="text/javascript" src="http://localhost:8080/test.json"></script> SyntaxError: missing ; before statement json文件中不是js命令,执行时报错了!! 2.报错的解决:加入对返回数据的处理方法,基本解决跨域问题 3.通过代码构造scrip
相关文章
相关标签/搜索