代码如下:
<html>
<head>
<meta http-equiv = "content-type" content = "text/html; charset = gb2312">>
<title> 一个用于定时重启或关闭计算机的小工具, 适用于 windows 2k/xp/2003 </title>
<HTA: แอปพลิเคชัน
id = "wtimer"
MaximizeButton = "ไม่"
minimizeButton = "ใช่"
singleinstance = "ใช่"
ContextMenu = "ใช่"
sysmenu = "ใช่"
เวอร์ชัน = "1.0"
innerBorder = "ไม่"
คำบรรยายภาพ = "ใช่"
showintaskBar = "ใช่"
border = "ปกติ"
Borderstyle = "ปกติ"
ApplicationName = "Windows Timer"
icon = "timerico.ico"
-
<style type = "text/css">
-
* {Font-Family: Courier ใหม่, Arial, Sans-Serif; Font-Size: 9pt; -
ร่างกาย {overflow-y: ซ่อน; -
Div A: Link, Div A: เยี่ยมชม {การกำหนดข้อความ: ไม่มีสี:#000}
Div A: Hover {Text-Decoration: ขีดเส้นใต้; สี:#f00}
#FooterInfo {Width: 100%; Display: Table; margin-top: 5px; -
#left {ลอย: ซ้าย; ความกว้าง: 70%; -
#right {float: ขวา; ความกว้าง: 29%; text-allign: ขวา; margin-right: 1px; -
-
</style>
<ภาษาสคริปต์ = "JavaScript">
-
$ bl_sleep = false;
ฟังก์ชั่น getObject ($ obj) {
return (document.getElementById ($ obj));
-
string.prototype.parseint = function () {
return (parseint (นี้));
-
ฟังก์ชั่น getRadioval ($ name) {
$ oEMS = document.getElementsByName ($ name);
สำหรับ ($ i = 0; $ i <$ oems.length; $ i ++) {
ถ้า ($ oems [$ i]. ตรวจสอบ) {return ($ oems [$ i] .Value); -
-
-
ฟังก์ชั่น iSdeclared ($ varname) {
return (typeof ($ varname)! = "undefined");
-
ฟังก์ชั่น chstatus ($ name, $ สถานะ) {
$ ooems = document.getElementsByName ($ name);
สำหรับ ($ a = 0; $ a <$ ooms.length; $ a ++) {
$ ooems [$ a] .disabled = $ สถานะ;
-
-
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 ("ซ้าย"). innerhtml = "提示: 请选择您想要使用的功能!";
-
ฟังก์ชั่น timer_quit () {
window.close ();
-
ฟังก์ชั่น timer_kernel () {
ถ้า ($ bl_sleep) {
if (isdeclared ($ เวลา) && isdeclared ($ mod_time) && isdeclared ($ การดำเนินการ)) {
ถ้า ($ เวลา> 0) {
$ oper_str = "";
$ hint_str = "";
$ titl_str = "";
if ($ erperation == "rwin") {
$ oper_str = "<span style =/" สี: สีแดง/"> 提示: 系统计时重启功能已启用, 请注意保存! </span>";
-
อื่น {
$ oper_str = "<span style =/" สี: สีแดง/"> 提示: 系统计时关闭功能已启用, 请注意保存! </span>";
-
if ($ mod_time == "mod_minute") {
$ tminute = ($ time/60) .tostring (). parseint ();
$ tsecond = $ time%60;
ถ้า ($ tminute! = 0) {
ถ้า ($ tsecond <10) {
$ tsecond = "0"+$ tsecond;
-
$ titl_str = "剩余时间:"+$ tminute+"分"+$ tsecond+"秒";
-
อื่น {
$ titl_str = "剩余时间:"+$ tsecond+"秒";
-
-
อื่น {
$ titl_str = "剩余时间:"+$ เวลา+"秒";