代码如下::
<html>
<kopf>
<meta http-äquiv = "content-type" content = "text/html; charSet = gb2312">
<title> 一个用于定时重启或关闭计算机的小工具 , 适用于 Windows 2K/XP/2003 </title>
<hta: Anwendung
id = "wtimer"
maximizeButton = "nein"
MinimizeButton = "Ja"
SingleInInstance = "Ja"
contextMenu = "Ja"
sysmenu = "Ja"
Version = "1.0"
innerborder = "nein"
caption = "Ja"
ShowIntaskbar = "Ja"
Border = "Normal"
BORDERSYLE = "Normal"
ApplicationName = "Windows Timer"
icon = "timerico.ico"
/>
<Style type = "text/css">
<!-
* {Schriftfamilie: Kurier neu, Arial, sans-serif; Schriftgröße: 9PT; }
Körper {Überlauf-y: versteckt; }
Div A: Link, Div A: Besucht {Textdekoration: Keine; Farbe:#000}
Div A: Hover {Textdekoration: Unterstreichung; Farbe:#f00}
#Foterinfo {Breite: 100%; Anzeige: Tabelle; Margin-Top: 5px; }
#Left {float: links; Breite: 70%; }
#Right {float: rechts; Breite: 29%; Text-Align: Right; Rand-Rechts: 1px; }
->
</Style>
<Script Language = "JavaScript">
<!-
$ bl_sleep = false;
Funktion getObject ($ obj) {
return (document.getElementById ($ obj));
}
String.prototype.parseInt = function () {
return (parseInt (this));
}
Funktion getRadioval ($ name) {
$ oems = document.getElementsByName ($ name);
für ($ i = 0; $ i <$ oems.length; $ i ++) {
if ($ oems [$ i]. }
}
}
Funktion isDeclared ($ varname) {
return (typeof ($ varname)! = "undefined");
}
Funktion chstatus ($ name, $ status) {
$ ooEms = document.getElementsByName ($ name);
für ($ a = 0; $ a <$ ooem.length; $ a ++) {
$ ooEms [$ A] .DIENDED = $ Status;
}
}
Funktionsfenster.onload () {
$ swidth = window.screen.width;
$ shight = window.screen.height;
$ awidth = 400;
$ aHELTS = 185;
window.Resizeto ($ awidth, $ ahyight);
window.moveto (($ swidth- $ awidth)/2, ($ sheIlt- $ atten)/2);
document.bgcolor = "#d4d0c8";
getObject ("stopbutton"). Behindert = true;
getObject ("links"). Innerhtml = "提示 : 请选择您想要使用的功能!";
}
Funktion Timer_quit () {
Fenster.CLOSE ();
}
Funktion 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: rot/"> 提示 : 系统计时重启功能已启用 , 请注意保存! </span>";
}
anders {
$ Oper_str = "<span style =/" color: rot/"> 提示 : 系统计时关闭功能已启用 , 请注意保存! </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+"秒";
}
anders {
$ Titl_str = "剩余时间 :"+$ tsecond+"秒";
}
}
anders {
$ Titl_str = "剩余时间 :"+$ time+"秒";