-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