<?php require_once('../include/request.inc.php'); ?>
<html>
<head>
<title>HTML在线编辑器</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="editor.css">
<script language="JavaScript" type="text/JavaScript">
//菜单列表
var menu_table="<table width='100%' cellspacing='0' cellpadding='2'>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_cr.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertTable()'>插入表格</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_sx.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tableProp()'>表格属性</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_sx2.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='cellProp()'>单元格属性</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_tr.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(1)'>插入一行</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_trdel.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(2)'>删除一行</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_td.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(3)'>插入一列</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_tddel.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(4)'>删除一列</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_hby.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(5)'>向右合并</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_hbx.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(6)'>向下合并</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/table_cf.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(7)'>拆分单元格</a></td></tr>";
menu_table+="</table>";
var menu_chars="<table width='100%' cellspacing='0' cellpadding='2'>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars1.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(0)'>换行符</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars2.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(1)'>版权符号</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars3.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(2)'>注册商标</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars4.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(3)'>商标符号</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars5.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(4)'>圆点</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars6.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(5)'>省略号</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars7.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(6)'>破折号</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/chars8.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(7)'>中划线</a></td></tr>";
menu_chars+="</table>";
var menu_eq="<table width='100%' cellspacing='0' cellpadding='2'>";
menu_eq+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/eq1.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertEQ()'>插入公式</a></td></tr>";
menu_eq+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='./Editorimages/eq2.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InstallEQ()'>安装公式编辑器插件</a></td></tr>";
menu_eq+="</table>";
//下拉菜单相关代码
var h;
var w;
var l;
var t;
var topMar = 1;
var leftMar = -2;
var space = 1;
var isvisible;
var MENU_SHADOW_COLOR='#E1F4EE';//定义下拉菜单阴影色
var global = window.document
global.fo_currentMenu = null
global.fo_shadows = new Array
function HideMenu()
{
var mX;
var mY;
var vDiv;
var mDiv;
if (isvisible == true)
{
vDiv = document.all("menuDiv");
mX = window.event.clientX + document.body.scrollLeft;
mY = window.event.clientY + document.body.scrollTop;
if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
vDiv.style.visibility = "hidden";
isvisible = false;
}
}
}
function ShowMenu(vMnuCode,tWidth) {
vSrc = window.event.srcElement;
vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=menu onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=MenuBody>" + vMnuCode + "</td></tr></table>";
h = vSrc.offsetHeight;
w = vSrc.offsetWidth;
l = vSrc.offsetLeft + leftMar+4;
t = vSrc.offsetTop + topMar + h + space-2;
vParent = vSrc.offsetParent;
while (vParent.tagName.toUpperCase() != "BODY")
{
l += vParent.offsetLeft;
t += vParent.offsetTop;
vParent = vParent.offsetParent;
}
menuDiv.innerHTML = vMnuCode;
menuDiv.style.top = t;
menuDiv.style.left = l;
menuDiv.style.visibility = "visible";
isvisible = true;
makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}
function makeRectangularDropShadow(el, color, size)
{
var i;
for (i=size; i>0; i--)
{
var rect = document.createElement('div');
var rs = rect.style
rs.position = 'absolute';
rs.left = (el.style.posLeft + i) + 'px';
rs.top = (el.style.posTop + i) + 'px';
rs.width = el.offsetWidth + 'px';
rs.height = el.offsetHeight + 'px';
rs.zIndex = el.style.zIndex - i;
rs.backgroundColor = color;
var opacity = 1 - i / (i + 1);
rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
el.insertAdjacentElement('afterEnd', rect);
global.fo_shadows[global.fo_shadows.length] = rect;
}
}
function scolor(obj)
{
obj.style.backgroundColor="";
}
function rcolor(obj)
{
obj.style.backgroundColor="#E1F4EE";
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin='0' topmargin='0' onmousemove='HideMenu()'>
<div id=menuDiv style='Z-INDEX: 1000; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8'></div>
<div class="yToolbar">
<div class="TBHandle"> </div>
<div class="Btn" TITLE="全部选择" LANGUAGE="javascript" onclick="format('selectall')">
<img class="Ico" src="./Editorimages/selectall.gif" WIDTH="18" HEIGHT="18">
</div>
<div class="TBSep"></div>
<div class="Btn" TITLE="删除" LANGUAGE="javascript" onclick="format('delete')">
- 1
- 2
- 3
前往页