摘要:
我们经常遇到JS 跨域的问题,跨域的解决方案有很多,JSONP是非常常用的跨域解决方案,这里封装了一下JSONP:function getJSONP(url, callback) { if (!url) { return; } var a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; //定义一个数组以便产生随机函数名 var r1 = Math.floor(Math.ran 阅读全文
posted @ 2013-04-01 09:47
kingwell
阅读(940)
评论(0)
推荐(0)