var i = 0; eval(new Array(101).join('alert(++i);')); var i = 0; new Function(new Array(101).join('alert(++i);'))();
解释: 1、string.replace(regexp, replacement): replacement可以是function. In this case, the function is invoked for each match, and the string it returns is used as the replacement text.