Blog之运行框

核心函数:

<script type="text/javascript">
function runCode(obj) {
     
var winname = window.open(''"_blank"'');
     winname.document.open(
'text/html''replace');
     winname.document.write(obj.value);
     winname.document.close();
}
</script>

示例:


原文地址:https://www.cnblogs.com/return/p/1594233.html