<script> var jsText = 'return function(){alert(1+1)}' var jscode = new Function(jsText)(); jscode(); </script>