页面添加演示代码

<html>
<head><title>ccc</title></head>
<body>
<p>
<textarea name="p" cols="75" rows="15" id="p" onFocus="this.select()"> 
可以将演示代码放在此处-------*
</textarea>
<br>
<input name="button" type=button onclick=runcode() value="代码运行">
<script>
function runcode()
{
code=p.value;
a=window.open()
a.opener=null
a.document.write(code)
a.document.close()
}
</script>
</p>
</body>
</html>

posted on 2011-02-12 17:02  ChinaLeo  阅读(232)  评论(0)    收藏  举报

导航