代码如下:
<html>
<头>
<meta http-equiv =“ content-type” content =“ text/html; charset = gb2312”>
<Title>一个用于定时重启或关闭计算机的小工具,适用于Windows 2K/XP/2003 </Title>
<hta:应用程序
id =“ wtimer”
最大化布顿=“否”
最小化=“是”
singleSinstance =“是”
contextMenu =“是”
sysmenu =“是”
版本=“ 1.0”
innerborder =“否”
字幕=“是”
ShowIntaskBar =“是”
边界=“正常”
borderstyle =“正常”
ApplicationName =“ Windows Timer”
图标=“ timerico.ico”
/>
<style type =“ text/css”>
<! -
* {font-formy:courier new,arial,sans-serif; font-size:9pt; }
身体{溢出Y:隐藏; }
Div A:链接,Div A:访问{文本 - 删除:无;颜色:#000}
Div A:Hover {文本 - 编写:下划线;颜色:#f00}
#FooterInfo {width:100%; display:table;保证金顶:5px; }
#left {float:左;宽度:70%; }
#right {float:right; width:29%; text-align:right; margin-right:1px; }
- >
</style>
<脚本语言=“ javascript”>
<! -
$ bl_sleep = false;
功能getObject($ obj){
返回(document.getElementById($ obj));
}
string.prototype.parseint = function(){
返回(Parseint(this));
}
函数getRadioval($ name){
$ oems = document.getElementsByname($ name);
对于($ i = 0; $ i <$ oems.length; $ i ++){
如果($ oems [$ i] .checked){return($ oems [$ i] .value); }
}
}
函数ISDECERARD($ varname){
返回(typeof($ varname)!=“ undefined”);
}
功能chstatus($ name,$ status){
$ ooems = document.getElementsByname($ name);
对于($ a = 0; $ a <$ ooems.length; $ a ++){
$ ooems [$ a] .disabled = $ status;
}
}
功能窗口.onload(){
$ swidth = window.screen.width;
$ sheight = window.screen.height;
$ awidth = 400;
$ aheight = 185;
window.resizeto($ awidth,$ aheight);
window.moveto(($ swidth- $ awidth)/2,($ sheight- $ aheight)/2);
document.bgcolor =“#d4d0c8”;
getObject(“ stopButton”)。禁用= true;
getObject(“左”)。innerhtml =“提示:请选择您想要使用的功能!”;
}
功能timer_quit(){
window.close();
}
功能timer_kernel(){
如果($ bl_sleep){
if(isDeclared($ time)&& isdeclared($ mod_time)&& isdeclared($ operation)){
如果($ time> 0){
$ oper_str =“”;
$ hint_str =“”;
$ titl_str =“”;
if($ operation ==“ rwin”){
$ oper_str =“ <span style =/”颜色:red/“>提示:系统计时重启功能已启用,请注意保存! </span>”;
}
别的 {
$ oper_str =“ <span style =/”颜色:red/“>提示:系统计时关闭功能已启用,请注意保存! </span>”;
}
if($ mod_time ==“ mod_minute”){
$ tminute =($ time/60).toString()。parseint();
$ tsecond = $ time%60;
如果($ tminute!= 0){
如果($ tsecond <10){
$ tsecond =“ 0”+$ tsecond;
}
$ titl_str =“剩余时间:”+$ tminute+“分”+$ tsecond+“秒”;
}
别的 {
$ titl_str =“剩余时间:”+$ tsecond+“秒”;
}
}
别的 {
$ titl_str =“剩余时间:”+$ time+“秒”;