代码如下:
<html>
<head>
<meta http-equiv = "content-type" content = "text/html; charset = gb2312">
<title> 一个用于定时重启或关闭计算机的小工具 , 适用于 Windows 2k/xp/2003 </ititle>
<HTA: Aplicação
id = "wtimer"
maximizeButton = "não"
minimizebutton = "sim"
singleInstance = "Sim"
contextmenu = "sim"
sysmenu = "sim"
versão = "1.0"
INNERBORDER = "NÃO"
Legenda = "Sim"
ShowIssaskbar = "Sim"
Border = "Normal"
Borderstyle = "Normal"
ApplicationName = "Windows Timer"
icon = "timerico.ico"
/>
<Style type = "text/css">
<!-
* {Font-Family: Courier New, Arial, Sans-Serif; Fonte-tamanho: 9pt; }
corpo {transbordamento-y: oculto; }
Div A: Link, Div A: Visitado {Decoração de texto: Nenhum; cor:#000}
Div A: Hover {Decoração de texto: sublinhado; cor:#f00}
#footerinfo {largura: 100%; display: tabela; margin-top: 5px; }
#left {float: esquerda; largura: 70%; }
#right {float: direita; largura: 29%; text-align: direita; margem-direita: 1px; }
->
</Style>
<Script Language = "JavaScript">
<!-
$ bl_sleep = false;
função getObject ($ obj) {
return (document.getElementById ($ obj));
}
String.prototype.parseint = function () {
return (parseint (isto));
}
função getRadioval ($ nome) {
$ oems = document.getElementsByName ($ nome);
para ($ i = 0; $ i <$ oems.length; $ i ++) {
if ($ OEMs [$ i] .CHecked) {return ($ oems [$ i] .Value); }
}
}
função isDeclared ($ varname) {
return (typeof ($ varname)! = "indefinido");
}
função chstatus ($ nome, $ status) {
$ ooems = document.getElementsByName ($ name);
para ($ a = 0; $ a <$ ooems.length; $ a ++) {
$ ooems [$ a] .Disabled = $ status;
}
}
função window.onload () {
$ swidth = window.screen.width;
$ sheight = window.screen.height;
$ ADWIDTH = 400;
$ ahight = 185;
Window.Resizeto ($ Awidth, $ ahight);
window.moveto (($ swidth- $ awidth)/2, ($ sheight- $ ahight)/2);
document.bgcolor = "#d4d0c8";
getObject ("StopButton"). desativado = true;
getObject ("Esquerda"). Innerhtml = "提示: 请选择您想要使用的功能!";
}
função timer_quit () {
window.close ();
}
função timer_kernel () {
if ($ bl_sleep) {
if (isDeclared ($ time) && isDeclared ($ mod_time) && isDecarared ($ Operação)) {
if ($ time> 0) {
$ Oper_str = "";
$ Hint_str = "";
$ Titl_str = "";
if ($ operação == "rwin") {
$ Oper_str = "<estilo span =/" cor: vermelho/"> 提示 : 系统计时重启功能已启用 , 请注意保存! </span>";
}
outro {
$ Oper_str = "<estilo span =/" cor: vermelho/"> 提示 : 系统计时关闭功能已启用 , 请注意保存! </span>";
}
if ($ mod_time == "mod_minute") {
$ tminute = ($ time/60) .ToString (). parseint ();
$ TSEGOND = $ TIME%60;
if ($ tminute! = 0) {
if ($ tsecond <10) {
$ TSECOND = "0"+$ TSEGOND;
}
$ Titl_str = "剩余时间:"+$ tminute+"分"+$ tsecond+"秒";
}
outro {
$ Titl_str = "剩余时间:"+$ tsecond+"秒";
}
}
outro {
$ Titl_str = "剩余时间:"+$ time+"秒";