html代码运行框效果,只要用户在html页面中加入这个js脚本,即可实现运行代码运行效果。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META content="text/html; charset=gb2312" http-equiv=Content-Type> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <META content="MSHTML 5.00.3315.2870" name=GENERATOR> <title>html页面运行代码js脚本_武鸣人</title> <STYLE>INPUT { BACKGROUND-COLOR: white; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #999999 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; float:left; HEIGHT: 18px } .unnamed1 { font-size: 9pt; color: #000000; text-decoration: none} </STYLE> <SCRIPT> function runEx(){ var winEx2 = window.open("", "winEx2", "width=500,height=300,status=yes,menubar=no,scrollbars=yes,resizable=yes"); winEx2.document.open("text/html", "replace"); winEx2.document.write(unescape(event.srcElement.parentElement.children[0].value)); winEx2.document.close(); } function saveFile() {//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) var win=window.open('','','top=10000,left=10000'); win.document.write(document.all.asdf.innerText) win.document.execCommand('SaveAs','','a.html') win.close(); } </SCRIPT> </HEAD> <BODY bgColor=#6699CC scroll=auto text=#000000> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <DIV align=center> <TEXTAREA id=asdf name=textfield rows=20 style="BACKGROUND-COLOR: black; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #999999 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; COLOR: white; FONT-FAMILY: Verdana; WIDTH:500px; float:left;" wrap=VIRTUAL></TEXTAREA> <BR><BR><INPUT name=Button onclick=runEx() type=button value=运行代码> <INPUT name=Button onclick=asdf.select() type=button value=全选> <INPUT name=Button onclick="asdf.value=''" type=button value=清空> <INPUT onclick=saveFile(); type=button value=保存代碼> </DIV> </BODY> </HTML>
本文来自武鸣人网站,转载请注明出处