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

Dynamically loading js files document.createElement_javascript tips

WBOY
Release: 2016-05-16 19:25:20
Original
1394 people have browsed it
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();
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template