<script type="text/javascript" >
window.onload=function(){
for(var i=1;i<3;i++){
var m ="i="+i;
setInterval(function(){test(m);},1000);
}
}
function test(e) {
console.log(e);
}
</script>
转载于:https://www.cnblogs.com/wsq-blog/p/10635456.html