代码如下:
<html>
<adal>
<meta http-equiv = "content-type" content = "text / html; charset = gb2312">
<Title> 一个用于定时重启或关闭计算机的小工具 , 适用于 Windows 2K / XP / 2003 </Title>
<HTA: application
id = "wtimer"
maximiserbutton = "no"
minimiserbutton = "oui"
singleinstance = "Oui"
contextMenu = "Oui"
sysmenu = "Oui"
version = "1.0"
innerborder = "no"
Légende = "Oui"
showintaskbar = "Oui"
Border = "Normal"
borderstyle = "normal"
applicationName = "Timer Windows"
icon = "timerico.ico"
/>
<Style type = "text / css">
<! -
* {Font-Family: Courier New, Arial, Sans-Serif; Font-Size: 9pt; }
corps {débordement-y: caché; }
Div A: Link, Div A: Visité {Text-Decoration: Aucun; Couleur: # 000}
Div A: Hover {Text-Decoration: sous-trait; Couleur: # F00}
#footeRinfo {largeur: 100%; affichage: table; marge: 5px; }
#left {float: gauche; largeur: 70%; }
#Right {float: droite; largeur: 29%; Text-Align: droite; marge-droite: 1px; }
->
</ Style>
<Script linguisse = "javascript">
<! -
$ bl_sleep = false;
fonction getObject ($ obj) {
return (document.getElementById ($ obj));
}
String.prototype.parseint = fonction () {
return (parseInt (this));
}
fonction getradioval ($ name) {
$ oems = document.getElementsByName ($ name);
pour ($ i = 0; $ i <$ oems.length; $ i ++) {
if ($ oems [$ i] .checked) {return ($ oEMS [$ i] .value); }
}
}
fonction isDeclared ($ varname) {
return (typeof ($ varname)! = "Undefined");
}
fonction chstatus ($ name, $ status) {
$ ooems = document.getElementsByName ($ name);
pour ($ a = 0; $ a <$ ooems.length; $ a ++) {
$ ooems [$ a] .disabled = $ status;
}
}
function window.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"). Disabled = true;
getObject ("Left"). innerhtml = "提示 : 请选择您想要使用的功能!";
}
fonction TIMER_QUIT () {
window.close ();
}
fonction TIMER_KERNEL () {
if ($ bl_sleep) {
if (isDeclared ($ time) && isDeclared ($ mod_time) && isDeclared ($ opération)) {
if ($ time> 0) {
$ Oper_str = "";
$ Hint_str = "";
$ Titl_str = "";
if ($ operation == "rwin") {
$ Oper_str = "<span style = /" couleur: rouge / "> 提示 : 系统计时重启功能已启用 , 请注意保存! </span>";
}
autre {
$ Oper_str = "<span style = /" couleur: rouge / "> 提示 : 系统计时关闭功能已启用 , 请注意保存! </span>";
}
if ($ mod_time == "mod_minute") {
$ tMinute = ($ time / 60) .toString (). parseInt ();
$ tsecond = $ time% 60;
if ($ tMinute! = 0) {
if ($ tsecond <10) {
$ tsecond = "0" + $ tsecond;
}
$ Titl_str = "剩余时间 :" + $ tminute + "分" + $ tsecond + "秒";
}
autre {
$ Titl_str = "剩余时间 :" + $ tsecond + "秒";
}
}
autre {
$ Titl_str = "剩余时间 :" + $ time + "秒";