以下是引用山水田在2005-7-12 15:14:33的发言:
想在Microsoft FrontPage2000中添加时间,但通过菜单栏中的插入钮插入时间后,发现时间是不随系统时间变的,是静态的.
我想让它随系统时间自动更新可以吗?
请问如何实现?
谢.
<html>
<head>
<script language=javaScript>
<!-- Beginning of JavaScript -
function clockon() {
thistime= new Date()
var hours=thistime.getHours()
var minutes=thistime.getMinutes()
var seconds=thistime.getSeconds()
if (eval(hours) <10) {hours="0"+hours}
if (eval(minutes) < 10) {minutes="0"+minutes}
if (seconds < 10) {seconds="0"+seconds}
thistime = hours+":"+minutes+":"+seconds
if(document.all) {
bgclocknoshade.innerHTML=thistime
bgclockshade.innerHTML=thistime
}
if(document.layers) {
document.bgclockshade.document.write('<div id="bgclockshade" style="position:absolute;visibility:visible;font-family:Verdana;color:FFAAAAA;font-size:120px;top:10px;left:12px">'+thistime+'</div>')
document.bgclocknoshade.document.write('<div id="bgclocknoshade" style="position:absolute;visibility:visible;font-family:Verdana;color:DDDDDD;font-size:120px;top:10px;left:10px">'+thistime+'</div>')
document.close()
}
var timer=setTimeout("clockon()",200)
}
// - End of JavaScript - -->
</script>
<STYLE>
A {
color:0000FF;
text-decoration:none;
}
</STYLE>
</head>
<body onLoad="clockon()" background="">
<div id="bgclockshade" style="position:absolute;visibility:visible;font-family:Verdana;color:FF8888;font-size:12px;top:10px;left:5px"></div>
<div id="bgclocknoshade" style="position:absolute;visibility:visible;font-family:Verdana;color:DDDDDD;font-size:12px;top:11px;left:6px"></div>
</body>
</html>
2sEhSiph.zip
(673 Bytes, 下载次数: 29)
|