标签:blog http os io for ar 2014 cti html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>自动变换星期</title>
<script>
window.onload = function (){
var i=0;
var oStop=document.getElementById("stop");
var timer = setInterval(function() {
var a=document.getElementById("week");
i++;
if(i>=50) {clearInterval(timer);}
a.value=="星期六"?a.value="星期五":a.value="星期六";
},1000);
oStop.onclick=function(){
i=50;
}
}
</script>
</head>
<body>
<form>
<input type="text" value="星期五" id="week" />
<input type="button" value="stop" id="stop" />
</form>
</body>
</html>
标签:blog http os io for ar 2014 cti html
原文地址:http://www.cnblogs.com/moliwanzi/p/3938956.html