⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 可打听时间的按钮.txt

📁 JavaScript特效(新)这里有许多的JAVA特效.供学者参考
💻 TXT
字号:
<html>
<head>
<TITLE>buttons clocks</TITLE>

<script language=javaScript>
<!-- Beginning of JavaScript -

var showtime=true
var timer
var i_sec=0

function clockon() {
    if (i_sec < 5) {
	    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
	    document.forms[0].elements[0].value=thistime
        i_sec++
	    timer=setTimeout("clockon()",1000)
    }
    else {
        clearTimeout(timer)
        i_sec=0
        document.forms[0].elements[0].value="现在几点?"
    }
}

function clockoff() {
	clearTimeout(timer)
    document.forms[0].elements[0].value="现在几点?"
}

//-->
</script>

</head>

<body obgcolor="#FFFFFF">
<form>
<input type="button" value="现在几点?" onClick="clockon()" onMouseOver="clockon()" onMouseOut="clockoff()">
</form>
</body>
</html>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -