| 任务栏上的小花样
任务栏上有放置快捷方式图标的快速启动栏,有显示时间的钟表,还有打开了的程序和窗口的按钮,不过任务栏上还能玩很多花样,就看你能不能想出来了。
首先在硬盘上新建一个目录,这里我们建立了一个c:\bar\的目录,并且在这个目录下新建了一个名为time.htm的文件,然后用记事本打开这个文件,在其中输入以下的内容:
<!-- Time-->
<html>
<head>
<title>Time</title>
<Style> body { border-width : 0 ; background-color:
buttonface; ... }</Style>
<style>
body { border: 0; background-color: buttonface;
color: black; margin: 3px,0,0,0 }
.clocktxt { font-family: Arial; font-weight:
normal; font-size: 8pt }
#btnsd { border: 2px groove white; background-color:
buttonface; font-family: verdana; font-size:
9px }
</style>
<meta http-equiv="Refresh" content="6000">
<body scroll="no">
<script language="JavaScript">
//Clock Script
var showclock;
function init(){
showdate()
showclock=true;
}
function showdate(){
//edit refresh rate here
var refreshrate=1000;
var Clock=new Date()
var hours=Clock.getHours()
var minutes=Clock.getMinutes()
var seconds=Clock.getSeconds()
var dn="AM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0) hours=12
if (minutes<=9) minutes= "0" + minutes
if (seconds<=9) seconds= "0" + seconds
//edit format here
format = hours+":"+minutes+":"+seconds+"
"+dn;
Time.innerHTML=format;
if (showclock==false) Time.innerHTML="<input
type='button' value='Sh.time' id='btnsd' title='Show
time'>"
else
setTimeout("showdate()",refreshrate)
}
</script>
</head>
<body scroll="no" onLoad="init()">
<center>
<font class="clocktxt"> <span id="Time"
style="position:center;"></span></font>
</body>
</html>
|