资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
js实现的定时关闭页面或定时提醒效果代码
<HTML xmlns:v xmlns:t> <HEAD> <STYLE>v\:*{behavior:url(#default#vml)} v\:oval,#oDiv{position=absolute;width=200;height=200} #stay{position=absolute;top=70;left=59;color=RED;padding=6;font=900 20/1.3} #input input{border-left=0;border-right=0} </STYLE> <TITLE>Cool Clock</TITLE> <hta:application border=none scroll=0 innerBorder=ridge> <?import namespace=t implementation="#default#time2"/> </HEAD> <BODY topmargin=12 onload=resizeTo(220,240),moveTo(200,5)> <v:oval fillcolor=#8F strokecolor=gray strokeweight=3 /> <t:par onrepeat=alt.click() repeatcount=indefinite> <t:TRANSITIONFILTER TYPE="clockWipe" dur=60 TARGETELEMENT="oDiv"/> <DIV ID="oDiv" DUR=60> <v:oval fillcolor=#FF0 strokecolor=RED strokeweight=2 /> </DIV></t:par> <a href=# id=alt></a><U id=stay unselectable=on></U> <t:ref id=ref style=width=200;height=200 src=臭男人.wmv mute=true clipBegin=23.8 dur=4 begin=alt.click /> <DIV> <t:par repeatCount=indefinite> <HR align=left id=hr0 color=TEAL width=200 size=14> <hr onpropertychange="per=parseInt(100*offsetWidth/hr0.offsetWidth),len.innerHTML=(per>9?'':'_')+per+'%'" style=position=absolute;top=219;height=expression(hr0.size) color=BLUE id=hr dur=60> <t:animate targetElement=hr attributeName=width id=hran from=0></t:par> Loading persent: <a id=len style=color=red;font=800></a> .</DIV> <dl><dt><h4>定时关闭叶面或则定时提醒:</h4> <form name=FF><dd>请设置定时关闭叶面<br>或则定时提醒的时间:<br> <input id=HH onmouseover=select() style=border-right=0 size=1 value=23><q id=input><input style=width=9 value=: disabled><input id=MM onmouseover=select() size=1 value=01><input style=width=9 value=: disabled></q><input id=SS onmouseover=select() style=border-left=0 size=1 value=00><br> <button hideFocus onclick='tips.innerHTML="窗口将于 "+FF.HH.value+":"+FF.MM.value+":"+FF.SS.value+"自动关闭...";setInterval("if(clock(FF.HH.value,FF.MM.value,FF.SS.value))window.close()",1)'>设定关闭</button><img width=5 height=1> <button hideFocus onclick='setInterval("if(clock(FF.HH.value,FF.MM.value,FF.SS.value)){ref.mute=false;ref.dur=30;alt.click()}",1); setInterval("if(clock(FF.HH.value,(FF.MM.value*1+1),FF.SS.value)){ref.mute=true;ref.dur=3;alt.click()}",1)'>设定提醒</button><img width=5 height=1> <button type=reset>重新设定</button><br> <span id=tips style='background=lightyellow'></span></dl> </form> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3E%20%0D%0Ahran.dur%3Dhr.dur%2Chran.to%3Dhr0.width%20%0D%0Aint%3Dnew%20Date()%2CB%3D'%3Cbr%3E'%20%0D%0AsetInterval(%22stay.innerHTML%3DString(int).slice(-22%2C-13).fontcolor(1)%2BB%2BString(new%20Date(new%20Date()-int-288e5)).split(%2F%20%2F)%5B3%5D%2BB%2BDate().slice(-13%2C-5).fontcolor()%22%2C1e3)%20%0D%0Afunction%20clock(hh%2Cmm%2Css)%7Bwith(new%20Date())%20return%20new%20Date()-new%20Date(getYear()%2CgetMonth()%2CgetDate()%2Chh*1%2Cmm*1%2Css*1%2B1)%3D%3D0%7D%20%0D%0A%3C%2Fscript%3E"> </BODY> </HTML>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程