HTML代码编辑器
本帖最后由 亚伦影音工作室 于 2025-5-31 20:42 编辑 <br /><br /><style type="text/css">.pcb{margin-right:0}</style><div class="pcb"><div class="t_fsz">
<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_212642">
<TABLE borderColor=#47A0DB cellSpacing=5 cellPadding=8 width=750 align=center bgColor=#1D618E border=2>
<TBODY>
<TR>
<TD align=middle bgColor=#D5E9F7><CENTER>
<FONT style="FONT-WEIGHT: normal; FONT-SIZE: 16pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal" face=微软雅黑 color=#ff0033><strong>HTML代 码 编 辑 器</strong></FONT><br><font size="2">( 亚伦影音改编)</font>
</CENTER></TD>
</TR>
<TR>
<TD align=middle><SCRIPT type=text/javascript>
function runEx(){
var winEx2 = window.open("", "winEx2", "width=500,height=300,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx2.document.open("text/html", "replace");
winEx2.document.write(unescape(event.srcElement.parentElement.children.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','','a.html')
win.close();
}
</SCRIPT>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<DIV align=center>
<TEXTAREA id=asdf style="BORDER-RIGHT: #ff0000 1px solid; BORDER-TOP: #ff0000 1px solid; BORDER-LEFT: #ff0000 1px solid; WIDTH: 90%; COLOR: #B8DAF1; BORDER-BOTTOM: #ff0000 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #113A55" name=textfield rows=20></TEXTAREA>
<BR>
<BR>
<INPUT onclick=runEx() type=button value=运行代码 name=Button1>
<INPUT onclick=asdf.select() type=button value=全选 name=Button2>
<INPUT onclick="asdf.value=''" type=button value=清空 name=Button>
<INPUT onclick=saveFile(); type=button value=保存代碼><BR><BR>
</DIV></TD>
</TR>
</TBODY>
</TABLE>
</td></tr></table>
本帖最后由 杨帆 于 2025-6-1 13:39 编辑
挺好!谢谢亚伦老师经典分享{:4_191:}
建议将这个“清空”按钮取消——增加记忆功能
或换个位置——比如放在最右边的位置,与“全选”按钮隔开,这样就不会前功尽弃了
页:
[1]