日期:2014-05-16 浏览次数:20440 次
var f = function(){
alert('111');
}
(new Function("","alert('222');")());
<script type="text/javascript">
var f = function(){
alert('111');
};
(new Function("","alert('222');")());
</script>
------解决方案--------------------
f (new Function("","alert('222');")());
调用f函数
红色部分成为了参数
------解决方案--------------------