js执行js字符串函数的方法

<script>
        var jsText = 'return function(){alert(1+1)}'

        var jscode = new Function(jsText)();

        jscode();
    </script>

  

posted @ 2014-04-17 14:19  yjwpop  阅读(2515)  评论(1编辑  收藏  举报