<script>
function test1() {
timer=setInterval("test()",1000);
}
function test() {
alert("asdfadsfasdf");
}
</script>
<input type=checkbox onClick="if(this.checked)test1()" name=chk1>
博客展示了一段JavaScript代码,定义了test1和test两个函数,test1函数使用setInterval设置定时调用test函数,test函数弹出提示框。还包含一个复选框,点击勾选时会调用test1函数。
<script>
function test1() {
timer=setInterval("test()",1000);
}
function test() {
alert("asdfadsfasdf");
}
</script>
<input type=checkbox onClick="if(this.checked)test1()" name=chk1>

被折叠的 条评论
为什么被折叠?
