-1
嗨,我希望你能帮助我解决这个问题..我如何让这段代码在3或4秒内停止?如何停止在JavaScript上闪烁的边框?
setTimeout(function() {
setInterval(function() {
document.getElementById("my").style.borderColor = "red";
}, 1000);
}, 500);
setInterval(function() {
document.getElementById("my").style.borderColor = "blue";
}, 1000);
}
http://mdn.beonex.com/en/DOM/window .clearInterval.html – 2014-12-19 10:39:07