js Date自定义函数 延迟脚本执行
发布时间:2016-12-30 来源:查字典编辑
摘要:复制代码代码如下:functiondelay(numberMillis){varnow=newDate();varexitTime=now....
复制代码 代码如下:
function delay(numberMillis){
var now = new Date();
var exitTime = now.getTime()+numberMillis;
while(true){
now = new Date();
if(now.getTime() > exitTime)
return;
}
}
document.write("<script language='javascript' src='js1.js'></script>");