<div class="htmlarea"> <textarea id="runcode18290"> <div id="bxArticle_97" style="padding:9;line-height:18px;height:90"> <table style="MARGIN-TOP: 12px; BACKGROUND: white; MARGIN-BOTTOM: 12px; WIDTH: 90%" cellspacing="0" bordercolordark="white" cellpadding="0" align="center" bordercolorlight="#bababa" border="1"> <tbody> <tr height="22"> <td style="PADDING-LEFT: 6px; BACKGROUND: #d4d0c8">◇ 请先修改下面的代码 - >> <u style="CURSOR: pointer">运行下面的js</u> </td> </tr> <tr valign="top" height="90"> <td style="PADDING-RIGHT: 6px; PADDING-LEFT: 6px; PADDING-BOTTOM: 6px; WORD-BREAK: break-all; PADDING-TOP: 6px" name="#jscode"><div contenteditable="true" style="width:100%;height:100%;"><script> alert("修改我~~") </script></div></td> </tr> </tbody> </table> </div> <script> dxy_init() function dxy_init(){ window.$=function(obj){return typeof(obj)=="string"?document.getElementById(obj):obj} } var threadID="97",myName="" $("bxArticle_97").onclick=function(e){ var e=event||e,ee=e.srcElement if(ee.tagName=="U"&&ee.innerText=="运行下面的js") jsCode_run(ee) } function jsCode_run(ee){ var data,w data=ee.parentNode.parentNode.nextSibling.innerText w=window.open("", "_blank","") w.document.write(data) w.document.close() if(/<script(.)+src=/.test(data)) w.location.reload(true) } </script> </textarea><br><input onclick="runEx('runcode18290')" type="button" value="运行代码"> <input onclick="doCopy('runcode18290')" type="button" value="复制代码"> <input onclick="doSave(runcode18290)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div> <br>从script8看到的运行效果,不错,