动态加载js文件 document.createElement


复制代码 代码如下:

var Rash=true;
var msg="";

function norash()
{
if (confirm("确定要取消吗"))
Rash=false;
}

function rashit()
{
setInterval('getrss()',Inttime);
}

function getrss()
{
if (Rash==true)
{
head=document.getElementsByTagName('head').item(0);
script=document.createElement('script');
script.src='INCLUDE/AutoUpdate.asp';
script.type='text/javascript';
script.defer=true;
void(head.appendChild(script));
window.status=msg;
}
}
rashit();

« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3