<div class="htmlarea"> <textarea id="runcode57752"> <script language="javascript"><!-- function clear(){ Source=document.body.firstChild.data; document.open(); document.close(); document.title="看不到源代码"; document.body.innerHTML=Source; } // --></script> <!-- 当然了,行家真正要查看源代码,还是有办法的,比如在地址栏中输入, javascript:alert(document.documentElement.outerHTML); --> </textarea><br><input onclick="runEx('runcode57752')" type="button" value="运行代码"> <input onclick="doCopy('runcode57752')" type="button" value="复制代码"> <input onclick="doSave(runcode57752)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div> <br>主要是用到了这段代码,脚本之家以前发布过类似的文章。<br><div class="codetitle"> <span><a style="CURSOR: pointer" data="49466" class="copybut" id="copybut49466" onclick="doCopy('code49466')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code49466"> <br>function clear(){ <br>Source=document.body.firstChild.data; <br>document.open(); <br>document.close(); <br>document.title="看不到源代码"; <br>document.body.innerHTML=Source; <br>} <br> </div>