现在的位置: 首页 > 综合 > 正文

页面添加演示代码

2012年05月28日 ⁄ 综合 ⁄ 共 341字 ⁄ 字号 评论关闭
<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>

抱歉!评论已关闭.