<script type=”text/javascript”>// <![CDATA[
function disptime(){
var time = new Date();
var hour = time.getHours();
var minute = time.getMinutes();
var second = time.getSeconds();
document.getElementById(“myclock”).value = hour+”:”+minute+”:”+second;</div>
<div mce_tmp=”1″> if(hour==”08″ && minute==”18″ && second==”0″){
window.close();
}
//如果小时==08 并且 分钟==18 并且 秒数==0 关闭窗口”注意零秒的时候”</div>
<div mce_tmp=”1″> setTimeout(“disptime()”,1000);
}
// ]]></script>
<form accept-charset=”UNKNOWN” enctype=”application/x-www-form-urlencoded” method=”get”>
<div><input id=”myclock” size=”15″ type=”text” /></div>
<input onclick=”window.close()” type=”button” value=”按钮” /> </form>在规定时间关闭窗口,定时调用window.close()