您的位置:首页 > 编程语言

如何在网页中运行自己的代码

2008-11-30 22:51 281 查看
<script type="text/javascript">
function Preview()
{
var TestWin=open('','','');
TestWin.document.open('text/html','replace');
TestWin.document.write(code.value);
TestWin.document.close();
}
</script>
<textarea id=code cols=60 rows=15></textarea>
<br>
<button onclick=Preview() >运行</button>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐