第1个回答 2010-08-03
<html>
<head>
<script>
function disableButton(){
if(new Date().getHours() == 18){
document.getElementById("button").setAttribute("disabled","disabled");
}
}
window.onload=function(){setInterval(disableButton, 1000);}
</script>
</head>
<body>
<input type="button" id="button" value="18点失效" />
</body>
</html>