2019-06-14发表2021-02-09更新前端笔记2 分钟读完 (大约365个字)js+thinkphp 实现jsonp跨越1、使用js创建script动态插入页面1234567891011// 用来创建script标签(function() { // 创建一个script标签 var script = document.createElement('script'); // 指定script的类型 script.type = 'text/javascript'; // 定义script请求的链接 后面加上callBack 请求成功后的回调 script.src = 'http://test.com/public/index.php/index/index/index?resume=all&callBack=jsonp'; // 把创建的标签插入到body的前面 document.body.firstElementChild.append(script);}())阅读更多