动态加载js文件 document.createElement_javascript技巧

js教程评论1.6K views阅读模式
复制代码 代码如下:

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();

企鹅博客
  • 本文由 发表于 2020年8月29日 03:16:36
  • 转载请务必保留本文链接:https://www.qieseo.com/385064.html

发表评论