<html>
<head>
<title></title>
<meta charset="utf-8" />
</head>
<body>
<input type="button" id="btn1" value="Click等三秒鐘" />
<script>
var win;
document.getElementById("btn1").addEventListener("click", function () {
var id = setTimeout(function () {
var t = new Date().toString();
alert(t);
}, 3000);
})
</script>
</body>
</html>
沒有留言:
張貼留言
問題沒有大小或好壞