<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>