代码预览器代码:
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'> <SCRIPT> function runEx(){ var winEx2 = window.open("", "winEx2",""); winEx2.document.open("text/html", "replace"); winEx2.document.write(unescape(event.srcElement.parentElement.children[0].value)); winEx2.document.close(); } function saveFile() { var win=window.open('','','top=10000,left=10000'); win.document.write(document.all.asdf.innerText) win.document.execCommand('SaveAs','','copy.htm') win.close(); } </SCRIPT> <SCRIPT language=JavaScript> <!-- function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } function JM_cc(ob){ var obj=MM_findObj(ob); if (obj) { obj.select();js=obj.createTextRange();js.execCommand("Copy");} } function MM_findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x; } //--> </SCRIPT> </head> <BODY leftMargin=0 topMargin=0> <TABLE cellSpacing=0 width="100%" border=0 background="p_w_picpaths/lgb.gif" height="1" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0"> <TR> <TD height="1"> <FORM action="" method=post name=form1> <TEXTAREA id=asdf name=textfield rows=25 cols="91"></TEXTAREA> <BR> <INPUT name=Button type=button value=预览效果 style="background-color: #FFFFFF"> <INPUT name=Button onclick=asdf.select() type=button value=全选代码 style="background-color: #FFFFFF"> <INPUT name=Button onclick="asdf.value=''" type=button value=清空代码 style="background-color: #FFFFFF"> <INPUT name=Button onclick="JM_cc('textfield')" type=button value=复制代码 style="background-color: #FFFFFF"> <INPUT type=button value=保存代码 style="background-color: #FFFFFF"> <INPUT a href="#" onclick="window.open('http://www.mlhd.org/myblog')" type=button value=特效首页 style="background-color: #FFFFFF"></a> <INPUT onclick="self.close()"< /font> type=button value=关闭窗口 style="background-color: #FFFFFF"></DIV> </TD></TR> </table> </body> </html> |
代码预览器
原创
©著作权归作者所有:来自51CTO博客作者魅力网络技术的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:网站搜索框中加入背景图片的方法
下一篇:CSS 漂亮搜索框美化代码
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
文件预览-文档在线转换-wps在线预览-文件预览在线查看
office文件及文档在线预览 提供office在线预览及PDF在线预览服务,支持Word文档在线预览、Excel在线预览、PowerPoint在线预览、WPS等Office文件在线预览,支持所有浏览器及移动设备Mobile预览,无需安装ActiveX控件,无需客户端部署即可实现办公文档在线预览。
在线预览 office365 在线Office 篇七:网页在线预览编辑 Office在线预览 word在线预览 -
搭建代码服务器,Gerrit代码审核,docker容器
配置代码服务器用于代码审查
git docker ubuntu Gerrit