动态创建script标签实现跨域资源访问的方法介绍
login.html 代码如下:[removed] function request(id,url){ oScript = document.getElementById(id); var head = document.getElementsByTagName(“head”).item(0); if (oScript) { head.removeChild(oScript); } oScript = document.createElement(“script”); oScript.setAttribute(“src”, url)
下载地址
用户评论