⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit.html

📁 用于编辑heml界面的
💻 HTML
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>代码编辑器</title>
<link rel="STYLESHEET" type="text/css" href="css.css">
<script src="abc.js" language="JScript"></script>
<script language="JavaScript">
//===========================================
//打开图片列表窗口
//===========================================
function openImageList(href) {
    var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=440,height=400");
    return;
}
//============================================
//接收返回的图片代码,并插入图片
//============================================

function receive9(which) {
Format1('pic','',which);
}



function Popupnew() {

	window.open("images.php", "none","resizable=yes,left=5,top=5,width=490,height=250,scrollbars=yes,menubar=no");
	//return false;
}	



//-->

</script>
</head>

<body SCROLL="no" STYLE="border: 0pt" bgcolor="white">
<fieldset>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>

<td align="left">
<table id="editbar" class="coolBar" cellspacing="0" cellpadding="0" style="font-weight: bold; border: 0 solid buttonface;z-index=2;">
<tr>
	<td style="width:3px;cursor:move;"><img SRC="images/head.gif" WIDTH="3" HEIGHT="16"></td>	
    <td class="coolButton" onclick="doFormat('Bold')" title="粗体"><img src="images/bold.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('Italic')" title="斜体"><img src="images/italic.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('Underline')" title="下划线"><img src="images/underline.gif" WIDTH="16" HEIGHT="16"></td>
    
	<td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
	<td class="coolButton" onclick="doFormat('Undo')" title="撤销"><img src="images/undo.gif" width="16" height="16"></td>
	<td class="coolButton" onclick="doFormat('Redo')" title="恢复"><img src="images/redo.gif" width="16" height="16"></td>	
	
	<td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
	<td class="coolButton" onclick="doFormat('JustifyLeft')" title="左对齐"><img src="images/jleft.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('JustifyCenter')" title="居中"><img src="images/jcenter.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('JustifyRight')" title="右对齐"><img src="images/jright.gif" WIDTH="16" HEIGHT="16"></td>
	
	<td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
    <td class="coolButton" onclick="doFormat('Cut')" title="剪切"><img src="images/cut.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('Copy')" title="复制"><img src="images/copy.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('Paste')" title="粘贴"><img src="images/paste.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('Delete')" title="删除"><img src="images/delete.gif" WIDTH="16" HEIGHT="16"></td>

    <td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
    <td class="coolButton" onclick="doFormat('CreateLink')" title="插入链结"><img src="images/link.gif" WIDTH="16" HEIGHT="16"></td>
	
    <td class="coolButton"  onclick="Popupnew()" title="插入图片"><img src="images/image.gif" WIDTH="16" HEIGHT="16"></td>   
	
	<td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
  
    <td id="colorbgSelect" style="padding: 0;" title="段落格式"> 
    <select onChange="doFormat('BackColor',this[this.selectedIndex].style.color); this.selectedIndex=0" style="width: 80px">
	<OPTION selected>文字底色
	<OPTION style="BACKGROUND: #000000; Color: #000000">Black
	<OPTION style="BACKGROUND: #0000FF; Color: #0000FF">Blue 1
	<OPTION style="BACKGROUND: #2222FF; Color: #2222FF">Blue 2
	<OPTION style="BACKGROUND: #4444FF; Color: #4444FF">Blue 3
	<OPTION style="BACKGROUND: #6666FF; Color: #6666FF">Blue 4
	<OPTION style="BACKGROUND: #333333; Color: #333333">Gray 1
	<OPTION style="BACKGROUND: #666666; Color: #666666">Gray 2
	<OPTION style="BACKGROUND: #999999; Color: #999999">Gray 3
	<OPTION style="BACKGROUND: #EEEEEE; Color: #EEEEEE">Gray 4
	<OPTION style="BACKGROUND: #004000; Color: #004000">Green 1
	<OPTION style="BACKGROUND: #006000; Color: #006000">Green 2
	<OPTION style="BACKGROUND: #008000; Color: #008000">Green 3
	<OPTION style="BACKGROUND: #00A000; Color: #00A000">Green 4
	<OPTION style="BACKGROUND: #FF0000; Color: #FF0000">Red 1
	<OPTION style="BACKGROUND: #FF2222; Color: #FF2222">Red 2
	<OPTION style="BACKGROUND: #FF4444; Color: #FF4444">Red 3
	<OPTION style="BACKGROUND: #FF6666; Color: #FF6666">Red 4
	<OPTION style="BACKGROUND: #FFFF00; Color: #FFFF00">Yellow 1
	<OPTION style="BACKGROUND: #FFFF33; Color: #FFFF33">Yellow 2
	<OPTION style="BACKGROUND: #FFFF66; Color: #FFFF66">Yellow 3
	<OPTION style="BACKGROUND: #FFFF99; Color: #FFFF99">Yellow 4
	<OPTION>自定义..</OPTION>
	</select>
    </td>
    
    
    <td id="colorSelect" style="padding: 0;" title="段落格式"> 
    <select onChange="doFormat('ForeColor',this[this.selectedIndex].style.color); this.selectedIndex=0" style="width: 80px">
	<OPTION selected>文字颜色
	<OPTION style="BACKGROUND: #000000; Color: #000000">Black
	<OPTION style="BACKGROUND: #0000FF; Color: #0000FF">Blue 1
	<OPTION style="BACKGROUND: #2222FF; Color: #2222FF">Blue 2
	<OPTION style="BACKGROUND: #4444FF; Color: #4444FF">Blue 3
	<OPTION style="BACKGROUND: #6666FF; Color: #6666FF">Blue 4
	<OPTION style="BACKGROUND: #333333; Color: #333333">Gray 1
	<OPTION style="BACKGROUND: #666666; Color: #666666">Gray 2
	<OPTION style="BACKGROUND: #999999; Color: #999999">Gray 3
	<OPTION style="BACKGROUND: #EEEEEE; Color: #EEEEEE">Gray 4
	<OPTION style="BACKGROUND: #004000; Color: #004000">Green 1
	<OPTION style="BACKGROUND: #006000; Color: #006000">Green 2
	<OPTION style="BACKGROUND: #008000; Color: #008000">Green 3
	<OPTION style="BACKGROUND: #00A000; Color: #00A000">Green 4
	<OPTION style="BACKGROUND: #FF0000; Color: #FF0000">Red 1
	<OPTION style="BACKGROUND: #FF2222; Color: #FF2222">Red 2
	<OPTION style="BACKGROUND: #FF4444; Color: #FF4444">Red 3
	<OPTION style="BACKGROUND: #FF6666; Color: #FF6666">Red 4
	<OPTION style="BACKGROUND: #FFFF00; Color: #FFFF00">Yellow 1
	<OPTION style="BACKGROUND: #FFFF33; Color: #FFFF33">Yellow 2
	<OPTION style="BACKGROUND: #FFFF66; Color: #FFFF66">Yellow 3
	<OPTION style="BACKGROUND: #FFFF99; Color: #FFFF99">Yellow 4
	<OPTION>自定义..</OPTION>
	</select>
    </td>
    
	<td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
    <td class="coolButton" onclick="showHelp()" title="帮助"><img src="images/help.gif" WIDTH="16" HEIGHT="16"></td>
</tr>
</table>
<iframe height=1 width=0 style="visibility: hidden" id=uploadback name=uploadback></iframe>
<table id="editbar1" class="coolBar" cellspacing="0" cellpadding="0" style="font-weight: bold; border: 0 solid buttonface;z-index=3;">
<tr>	
    <td style="width: 3;"> </td>
    <td class="coolButton" onclick="doFormat('Outdent')" title="减小缩进"><img src="images/outdent.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('Indent')" title="增加缩进"><img src="images/indent.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('InsertHorizontalRule')" title="插入水平线"><img src="images/hr.gif" WIDTH="16" HEIGHT="16"></td>
    
    <td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
    <td class="coolButton" onclick="doFormat('FormatBlock','&lt;OL&gt;')" title="编号"><img src="images/ol.gif" WIDTH="16" HEIGHT="16"></td>
    <td class="coolButton" onclick="doFormat('FormatBlock','&lt;UL&gt;')" title="项目符号"><img src="images/ul.gif" WIDTH="16" HEIGHT="16"></td>

    <td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
    <td class="coolButton" onclick="format('table','')" title="插入表格"><img src="images/table.gif" WIDTH="16" HEIGHT="16"></td>

	
    <td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
    <td class="coolButton" onclick="doFormat('RemoveFormat')" title="去除格式"><img src="images/unformat.gif" WIDTH="16" HEIGHT="16"></td>
    
    <td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
	<td id="formatSelect" style="padding: 0;" title="段落格式" > 	
	
	
		<select onchange="doSelectClick('FormatBlock',this);this.returnValue=false;" style=" width: 80px;" id="select1" name="select1">
			<option>段落格式</option>
			<option VALUE="&lt;P&gt;">普通
			<option VALUE="&lt;PRE&gt;">已编排格式
			<option VALUE="&lt;H1&gt;">标题一
			<option VALUE="&lt;H2&gt;">标题二
			<option VALUE="&lt;H3&gt;">标题三
			<option VALUE="&lt;H4&gt;">标题四
			<option VALUE="&lt;H5&gt;">标题五
			<option VALUE="&lt;H6&gt;">标题六
            <option VALUE="&lt;H7&gt;">标题七
		</select>
	</td>
	<td id="fontSelect" style="padding: 0;" title="字体">
		<select onchange="doSelectClick('FontName',this);" style="width: 50px;">
			<option>字体</option>
			<option VALUE="宋体">宋体
			<option VALUE="楷体_GB2312">楷体
			<option VALUE="隶书">隶书
			<option VALUE="黑体">黑体
			<option VALUE="仿宋_GB2312">仿宋
			<option VALUE="arial">Arial
			<option VALUE="Times New Roman">Times New Roman
		</select>
	</td>
	<td id="sizeSelect" style="padding: 0;" title="字体大小">
		<select onchange="doSelectClick('FontSize',this);" style="width: 75px;">
			<option>字体大小</option>
			<option VALUE="1">1
			<option VALUE="2">2
			<option VALUE="3">3
			<option VALUE="4">4
			<option VALUE="5">5
			<option VALUE="6">6
            <option VALUE="7">7
		</select>
	</td>
	<td style="padding: 0;" title="特殊字体格式">
		<select id="specialtype" onchange="doSelectClick('FormatBlock',this);this.returnValue=false;" style=" width: 100px;">
			<option>特殊字体格式</option>
			<option VALUE="SUP">上标
			<option VALUE="SUB">下标
			<option VALUE="DEL">删除线
			<option VALUE="BLINK">闪烁
			<option VALUE="BIG">增大字体
			<option VALUE="SMALL">减小字体
		</select>
	</td>
	<td style="width: 4;"><img src="images/separator.gif" WIDTH="2" HEIGHT="18"></td>
<!--    <td class="coolButton" onclick="showHelp()" title="帮助"><img src="images/help.gif" WIDTH="16" HEIGHT="16"></td>-->
</tr>
</table>
</td>
<td align="right">&nbsp; </td>
<!--
<td align="right" class="coolButton" onclick="showmore()" title="更多工具栏" style="padding:0;width:3" id="more">
	<img src="images/more.gif" border="0" WIDTH="8" HEIGHT="16"></td> -->
</tr></table>
</fieldset>
<iframe ID="edit1" SRC="editor.html" NAME="myEditor" onfocus="document.all.editbar._editor = window.frames[this.id];" style="width: 100%; height: 90%;"></iframe>
<iframe id="uploadback" name="uploadback" style="display:none"></iframe>
<script language="javascript">
if((window.navigator.userAgent.indexOf("IE 5") < 1) && (window.navigator.userAgent.indexOf("IE 6") < 1)) {
	alert("请使用Microsoft Internet Explorer 5.0\n或更高版本的浏览器!");
	window.close();
}
window.onload = init;
window.onresize = fixSize;
document.all.editbar._editor = window.frames[document.all.edit1.id];
document.all.editbar1._editor = window.frames[document.all.edit1.id];
</script>
</body>
</html>

<script language="javascript">

function format (what,opt) {
//EditCtrl.focus ();
//selectRange ();

var tablevar = showModalDialog ("table.html", "", "dialogWidth:23.6em; dialogHeight:11.3em; status:0");
//var tablevar=receiveVal9(val)

	if (tablevar != null) {
	tablevar = tablevar.split("*");
	var rows_v = tablevar[0];
	var columns_v = tablevar[1];
	var width_v = tablevar[2];
	var widthtype_v;
	if (tablevar[3]) var widthtype_v = "%";
		var border_v = tablevar[4];
		var cellspacing_v = tablevar[5];
		var cellpadding_v = tablevar[6];
		string = "<table border=\""+border_v+"\" borderColorDark=#ffffff borderColorLight=#000000  width=\""+width_v+""+widthtype_v+"\" cellspacing=\""+cellspacing_v+"\" cellpadding=\""+cellpadding_v+"\">";
		for (var i=1; i<=rows_v; i++){
			string = string+"<tr>";
			for (var i1=1; i1<=columns_v; i1++){
				string = string+"<td>&nbsp;</td>";
			}
			string = string+"</tr>";
			}
			string = string+"</table>";
	//edit.pasteHTML (string);
	myEditor.pasteHTML(string);

	}
}


function forcolor (what,opt) {
		//myEditor.document.execCommand (what,"",opt);

		var arr = showModalDialog("selcolor.html", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
  if (arr != null) format('forecolor', arr);
  else
		myEditor.focus ();
		//opt = prompt("hy_lan_04025","");
}

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -