javascript和css兼容性小结
?
var temp =[]function test(){var arr = ["a","b","c"]for(var i=0;i<arr.length;i++){var o={};var v = arr[i];o.say = function(str){return function(){JSLogger.log(str)}}(v);temp.push(o);}}test();temp[0].say();var v ="BBB";//全局变量(function (v){v ="AAAA";//毕包中重新赋值alert(v);//AAAA})(v);alert(v);//BBBB 毕包中的操作不会影响包外