語法展示::  http://home.graffiti.net/er4gfdg/


請用IE6.0或更新版本觀看語法特效展示



將以下程式碼複製,貼在<head>及</head>標籤之間。

<script language="JavaScript">
<!--
var timerID = null
var timerRunning = false
var stardate = new Date()
var startime = gettotalsecond(stardate)
function stopclock(){
    // cannot directly test timerID on DEC OSF/1 in beta 4.
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}
function startclock(){
     // Make sure the clock is stopped
    stopclock()
    showtime()
}
function gettotalsecond(getdate) {
    var hours = getdate.getHours()
    var minutes = getdate.getMinutes()
    var seconds = getdate.getSeconds()
    var gettotalsecond = seconds + minutes * 60 + hours * 3600
    return(gettotalsecond)
}
function showtime(){
    var now = new Date()
    var timeValue = gettotalsecond(now)
    document.clock.face.value = timeValue - startime
    timerID = setTimeout("showtime()",1000)
    timerRunning = true
}
-->
</script>


將以下程式碼複製,貼在插入<body >標籤裡面。

 onload="startclock()"


將以下程式碼複製,貼在<body>及</body>標籤之間。

<center>
<table border="0"><tr valign="top">
<td valign=top>您在本頁停留</td>
<td><form name="clock" onsubmit="0">
<input type="text" size="3" name="face">秒
</form></td>
</tr></table>
</center>

arrow
arrow
    全站熱搜

    uuiop6623 發表在 痞客邦 留言(0) 人氣()