Home >Web Front-end >JS Tutorial >setTimeout automatically triggers a js method_javascript skills

setTimeout automatically triggers a js method_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:03:321023browse
复制代码 代码如下:





timeout





<script> <br>x = 0 <br>function countSecond() <br>{ x = x 1 <br>  document.getElementById("time").value=x; <br>  setTimeout("countSecond()", 1000) <br>} <br></script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn