for (var j = 1; j <= 5; j++) { //每次延迟1秒 (function (j) { setTimeout(function () { console.log(j); }, j * 1000); })(j); }
js for循环中延迟 setTimeout
原文:https://www.cnblogs.com/ljy0905/p/12720542.html