使用闭包,像这样:
for(var i=0;i<10;i++){ qq.maps.event.addListener(marker[i],"click", (function(i){ return function(){alert(i);} })(i));}