代码如下:
<html>
<head>
<meta http-equiv = "content-type" content = "text/html ؛ charset = gb2312">
<title> 一个用于定时重启或关闭计算机的小工具 , 适用于 Windows 2K/XP/2003 </itlem>
<hta: التطبيق
id = "wtimer"
MailasizedButton = "لا"
mailsizeButton = "نعم"
SingleInstance = "نعم"
ContextMenu = "نعم"
sysmenu = "نعم"
الإصدار = "1.0"
innerborder = "لا"
Caption = "نعم"
ShowIntaskBar = "نعم"
الحدود = "طبيعي"
BorderStyle = "Normal"
ApplicationName = "Windows Timer"
icon = "timerico.ico"
/>
<type type = "text/css">
<!-
* {font-family: Courier New ، Arial ، sans-serif ؛ font-size: 9pt ؛ }
الجسم {overflow-y: Hidden ؛ }
Div A: Link ، Div A: زيارة {text-decoration: none ؛ color:#000}
div a: hover {text-decoration: thendline ؛ color:#f00}
#FooterInfo {Width: 100 ٪ ؛ Display: Table ؛ Margin-Top: 5px ؛ }
#LEFT {Float: Left ؛ Width: 70 ٪ ؛ }
#right {float: right ؛ width: 29 ٪ ؛ text-align: right ؛ margin-right: 1px ؛ }
->
</style>
<script language = "javaScript">
<!-
$ bl_sleep = false ؛
وظيفة getObject ($ obj) {
return (document.getElementById ($ OBJ)) ؛
}
string.prototype.parseint = function () {
العودة (parseint (هذا)) ؛
}
وظيفة getRadioval (اسم $) {
$ OEMS = document.getElementSbyName ($ name) ؛
لـ ($ i = 0 ؛ $ i <$ oems.length ؛ $ i ++) {
if ($ oems [$ i] }
}
}
وظيفة isDeclared ($ varname) {
إرجاع (typeof ($ varname)! = "undefined") ؛
}
وظيفة chstatus (اسم $ ، $ $) {
$ ooms = document.getElementSbyName ($ name) ؛
لـ ($ a = 0 ؛ $ a <$ ooms.length ؛ $ a ++) {
$ ooms [$ a] .disabled = $ status ؛
}
}
وظيفة window.onload () {
$ swidth = window.screen.width ؛
$ snight = window.screen.Height ؛
$ awidth = 400 ؛
$ aheight = 185 ؛
Window.Resizeto ($ awidth ، $ aheight) ؛
window.moveto (($ swidth- $ awidth)/2 ، ($ sheight- $ aheight)/2) ؛
document.bgColor = "#d4d0c8" ؛
getObject ("stopbutton"). معطل = صحيح ؛
getObject ("يسار"). innerhtml = "提示 : 请选择您想要使用的功能!" ؛
}
وظيفة timer_quit () {
window.close () ؛
}
وظيفة timer_kernel () {
if ($ bl_sleep) {
if (isDeclared ($ time) && isdeclared ($ mod_time) && isdeclared ($ stoper)) {
if ($ time> 0) {
$ oper_str = "" ؛
$ hint_str = "" ؛
$ titl_str = "" ؛
if ($ operation == "rwin") {
$ oper_str = "<span style =/" color: red/"> : : : , 请注意保存! </span>" ؛
}
آخر {
$ oper_str = "<span style =/" color: red/"> : : : , 请注意保存! </span>" ؛
}
if ($ mod_time == "mod_minute") {
$ tminute = ($ time/60) .ToString (). parseint () ؛
$ tsecond = $ time ٪ 60 ؛
إذا ($ tminute! = 0) {
if ($ tsecond <10) {
$ tsecond = "0"+$ tsecond ؛
}
$ titl_str = "剩余时间 :"+$ tminute+"分"+$ tsecond+"秒" ؛
}
آخر {
$ titl_str = "剩余时间 :"+$ tsecond+"秒" ؛
}
}
آخر {
$ titl_str = "剩余时间 :"+$ time+"秒" ؛