代码如下: 
复制代码 代码如下:
 
var otherJScipt = document.createElement("script"); 
otherJScipt = document.createElement("script"); 
otherJScipt.setAttribute("type", "text/javascript"); 
otherJScipt.setAttribute("src", "/xxx.js"); 
document.getElementsByTagName("head")[0].appendChild(otherJScipt);//追加到head标签内 
//判断服务器 
if (navigator.userAgent.indexOf("IE") >= 0) { 
//IE下的事件 
otherJScipt.onreadystatechange = function () { 
//IE下的判断,判断是否加载完成 
if (otherJScipt && (otherJScipt.readyState == "loaded" || otherJScipt.readyState == "complete")) { 
otherJScipt.onreadystatechange = null; 
callMyFun(); 
} 
}; 
} 
else { 
otherJScipt.onload = function () { 
otherJScipt.onload = null; 
callMyFun(); 
}; 
} 
您可能感兴趣的文章:
相关文章
最新评论
 站长推荐 正版Windows 10 家庭/专业版,操作系统限时抢购[¥1088→¥248] 站长推荐 Microsoft Office 2016/2019/365 正版最低价仅需[ ¥148元]
大家感兴趣的内容
最近更新的内容
常用在线小工具
