代码如下:
<html>
<Evista>
<meta http-oquiv = "content-type" content = "text/html; charset = gb2312">
<title> 一个用于定时重启或关闭计算机的小工具 , 适用于 Windows 2K/XP/2003 </title>
<HTA: aplicación
id = "wtimer"
maximizeButton = "no"
minimizeButton = "Sí"
singleInstance = "Sí"
contextMenu = "Sí"
sysmenu = "sí"
versión = "1.0"
innerBorder = "no"
subtítulos = "Sí"
showInTaskBar = "Sí"
borde = "normal"
BorderStyle = "Normal"
ApplicationName = "Temporizador de Windows"
icon = "Timerico.ico"
/>
<Style type = "text/css">
<!-
* {Font-Family: Courier New, Arial, Sans-Serif; Font-Size: 9PT; }
cuerpo {desbordamiento-y: oculto; }
Div A: Link, Div A: Visited {Text-Decoration: None; Color:#000}
Div A: Hover {Text-Decoration: Underline; Color:#F00}
#footerInfo {ancho: 100%; pantalla: tabla; margen-top: 5px; }
#left {float: izquierda; ancho: 70%; }
#right {float: right; ancho: 29%; text-align: right; margen-derecha: 1px; }
->
</style>
<Script language = "javaScript">
<!-
$ bl_sleep = false;
función getObject ($ obj) {
return (document.getElementById ($ obj));
}
String.prototype.parseInt = function () {
return (parseint (this));
}
función getRadioval ($ name) {
$ oems = document.getElementsByName ($ name);
para ($ i = 0; $ i <$ oems.length; $ i ++) {
if ($ oems [$ i] .ecked) {return ($ oems [$ i] .value); }
}
}
función isDeclared ($ varname) {
return (typeof ($ varname)! = "indefinido");
}
función chstatus ($ name, $ status) {
$ ooems = document.getElementsByName ($ name);
para ($ a = 0; $ a <$ ooems.length; $ a ++) {
$ ooems [$ a] .disable = $ status;
}
}
función window.onload () {
$ swidth = window.screen.width;
$ sheight = window.screen.height;
$ awidth = 400;
$ AHEIGHT = 185;
Window.resizeto ($ awidth, $ aight);
Window.moveto (($ swidth- $ awidth)/2, ($ sheight- $ aheight)/2);
document.bgcolor = "#d4d0c8";
getObject ("stopButton"). DISCABILITO = True;
getObject ("izquierda"). innerhtml = "提示 : 请选择您想要使用的功能!";
}
función timer_quit () {
window.close ();
}
función timer_kernel () {
if ($ bl_sleep) {
if (isDeclared ($ time) && isDeclared ($ mod_time) && isDeclared ($ operation)) {
if ($ time> 0) {
$ Oper_str = "";
$ Hint_str = "";
$ Titl_str = "";
if ($ operation == "rwin") {
$ Oper_str = "<span style =/" color: rojo/"> 提示 : 系统计时重启功能已启用 , 请注意保存! </span>";
}
demás {
$ Oper_str = "<span style =/" color: rojo/"> 提示 : 系统计时关闭功能已启用 , 请注意保存! </span>";
}
if ($ mod_time == "mod_minute") {
$ tminute = ($ tiempo/60) .ToString (). parseInt ();
$ TSECOND = $ TIME%60;
if ($ tminute! = 0) {
if ($ tsecond <10) {
$ tsecond = "0"+$ tsecond;
}
$ Titl_str = "剩余时间 :"+$ tminute+"分"+$ tsecond+"秒";
}
demás {
$ Titl_str = "剩余时间 :"+$ tsecond+"秒";
}
}
demás {
$ Titl_str = "剩余时间 :"+$ time+"秒";