Home >Web Front-end >JS Tutorial >Dynamically loading js files document.createElement_javascript tips

Dynamically loading js files document.createElement_javascript tips

WBOY
WBOYOriginal
2016-05-16 19:25:201386browse
Copy code The code is as follows:

var Rash=true;
var msg="";

function norash()
{
if (confirm("Are you sure you want to cancel?"))
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();
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn