<script language="JavaScript">
function screensave(){
test.value++;
if(test.value==5){
test.style.display='none';
document.all[4].bgColor='black';
}
}
function screenopen(){
test.value=0;
test.style.display='';
document.all[4].bgColor='';
}
</script>
<body οnkeydοwn="screenopen()" οnmοusemοve="screenopen()" οnlοad="setInterval('screensave()',1000)">
5 秒屏保<input id="test">
转载于:https://www.cnblogs.com/pyt5208/archive/2006/07/09/446619.html