0523BOM

    新东西BOM

 

<body>
<input type="button" value="开始" onclick="start()" />
<input type="button" value="结束" onclick="end()" />
</body>

</html>
<script>
// window.setTimeout("alert('123')",1000);
var x = [];

function start() {
x.push(window.setInterval("alert(x)", 1000));
}

function end() {
for(var i = 0; i < x.length; i++) {
window.clearInterval(x[i]);
}
}
</script>

posted @ 2017-05-23 16:39  小伙子很浪  阅读(97)  评论(0编辑  收藏  举报