Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js settimeout

<input type="text" id="displayBox" name="displayBox" value="0">
 
<script>
x = 0
function countSecond() 
{ 
    x = x+1
    document.getElementById("displayBox").value=x 
    setTimeout("countSecond()", 1000)
}
// 执行函数
countSecond()
</script>
Source by www.runoob.com #
 
PREVIOUS NEXT
Tagged: #js #settimeout
ADD COMMENT
Topic
Name
4+4 =