EESaiEdit.js 简单编辑器

var EES_ESlen,EES_ESpop,EES_ESid,EES_ESan,EES_ESsm,EES_ESse,EES_ESsy,EES_ESqy,EES_ESby;
var EES_Vrwid,EES_Vrhei,EES_Vrheit,EES_Vrheic,EES_Kiframe,EES_Ktextarea;
var EES_Edialog,EES_EDWindow,EES_EDDiv,EES_EDValue,EES_EDMode=1;
var EES_EDCurGEditor,EES_EDCurGMenuId,EES_EDCurRange,EES_SfullscreenMode=0;
//--------++++++++1
var EES_pg="[page]";
var EES_cr="[EESai.Com]";
//--------++++++++2
/* ---------------------------- 编辑器区域生成和取值信息(如果一个页面需要调用多个编辑器,可以拷贝该文件,替换EES_为其他X_,并更改下面的EESaiEdit过程名即可同规则调用) ---------------------------- */
//定义并生成编辑器区域
function EESaiEdit(InitValue){
EES_Vrwid="666px";
EES_Vrhei=280;
if(arguments[3]){EES_Vrwid=arguments[3];EES_Vrwid=(EES_Vrwid.toString().indexOf("%")==-1? parseInt(EES_Vrwid)+"px":EES_Vrwid);}
if(arguments[4]){EES_Vrhei=parseInt(arguments[4]);EES_Vrheit=28;EES_Vrheic=(EES_Vrhei-EES_Vrheit-1)+"px";EES_Vrhei+="px";EES_Vrheit+="px";}
EES_ESan=arguments[1];
EES_ESlen=arguments[2];
EES_ESpop=arguments[5];
EES_ESid=arguments[6];
EES_ESsm=arguments[7];
EES_ESse=arguments[8];
EES_ESsy=arguments[9];
EES_ESqy=arguments[10];
EES_ESby=arguments[11];
EES_Estyle();
EES_Emenustyle();
EES_Emenuziti();
EES_Emenusize();
EES_Emenucolor();
EES_Emenubgcolor();
//--------++++++++1
EES_Emenumy();
EES_Emenux();
//--------++++++++2
if(document.getElementById(EES_ESan)){InitValue=document.getElementById(EES_ESan).value;InitValue=EES_Ehtmsi(InitValue)}
document.write("<div id='"+EES_ESid+"'>阿赛HTML在线编辑器[EESaiEdit]</div>");
EES_EDDiv=document.getElementById(EES_ESid);
EES_EDDiv.style.width=EES_Vrwid;
EES_EDDiv.style.height=EES_Vrhei;
EES_EDDiv.style.background="#"+EES_ESqy+"";
EES_EDDiv.innerHTML=EES_Ecrtbutton();
EES_Ktextarea=document.createElement("textarea");
EES_Ktextarea.style.display="none";
EES_Ktextarea.style.width=EES_Vrwid;
EES_Ktextarea.style.height=EES_Vrheic;
EES_Ktextarea.style.fontSize="12px";
EES_Ktextarea.style.color="#00F";
EES_Ktextarea.style.background="#"+EES_ESby+"";
EES_Ktextarea.style.border="0px";
EES_EDDiv.appendChild(EES_Ktextarea);
EES_Kiframe=document.createElement("iframe");
EES_Kiframe.style.width=EES_Vrwid;
EES_Kiframe.style.height=EES_Vrheic;
EES_Kiframe.style.background="#"+EES_ESby+"";
EES_Kiframe.frameBorder=0;
EES_Kiframe.marginHeight=0;
EES_Kiframe.marginWidth=0;
EES_Kiframe.src="about:blank";
EES_EDDiv.appendChild(EES_Kiframe);
EES_EDWindow=EES_Kiframe.contentWindow;
with(EES_EDWindow.document){designMode="On";
open();
write("<html><head><title>阿赛HTML在线编辑器[EESaiEdit]</title><style type=\"text/css\">body{background:url("+EES_ESsm+EES_ESse+"EESaiEdit_bgc.gif);font-size:14px;}</style></head><body>&nbsp;</body></html>");
close();
//body.style.width=(EES_Vrwid.toString().indexOf("%")==-1? parseInt(EES_Vrwid)-30-10+"px":EES_Vrwid);
//body.style.padding=(EES_Vrwid.toString().indexOf("%")==-1? "10px":"0px");
body.style.width="100%";
//body.style.fontSize="14px";
body.innerHTML=InitValue;}
EES_EAddEventHandler(EES_EDWindow.document,"contextmenu",EES_Smon);
EES_EAddEventHandler(EES_EDWindow.document,"mouseup",EES_Smup);
EES_EAddEventHandler(EES_EDWindow.document,"click",EES_Smgo);
EES_EAddEventHandler(EES_EDWindow.document,"keydown",EES_Skon);
EES_EAddEventHandler(EES_EDWindow.document,"keyup",EES_Skup);
}
/* ---------------------------- 编辑器区域按钮设置 ---------------------------- */
//编辑器的菜单
var EES_Mtoolb={
'icoSty':{'bgp':"0px 0",'fun':"EES_Smenushow(this,'EES_Imenustyle')",'tip':"样式",'class':"EES_Cbtn"},
'icoFnt':{'bgp':"-20px 0",'fun':"EES_Smenushow(this,'EES_Imenuziti')",'tip':"字体",'class':"EES_Cbtn"},
'icoFsz':{'bgp':"-40px 0",'fun':"EES_Smenushow(this,'EES_Imenusize')",'tip':"字号",'class':"EES_Cbtn"},
'icoCol':{'bgp':"-60px 0",'fun':"EES_Smenushow(this,'EES_Imenucolor')",'tip':"字体颜色",'class':"EES_Cbtn"},
'icoBgCol':{'bgp':"-80px 0",'fun':"EES_Smenushow(this,'EES_Imenubgcolor')",'tip':"背景颜色",'class':"EES_Cbtn"},
'icoWgt':{'bgp':"-100px 0",'fun':"EES_Sformat('Bold')",'tip':"加粗",'class':"EES_Cbtn",'bio':"粗"},
'icoIta':{'bgp':"-120px 0",'fun':"EES_Sformat('Italic')",'tip':"斜体",'class':"EES_Cbtn"},
'icoUln':{'bgp':"-140px 0",'fun':"EES_Sformat('Underline')",'tip':"下划线",'class':"EES_Cbtn"},
'icoAgl':{'bgp':"-160px 0",'fun':"EES_Sstyle(\"<Span style=text-align:left;display:block;>\",\"</Span>\")",'tip':"将选中的对象左对齐",'class':"EES_Cbtn"},
'icoAgc':{'bgp':"-180px 0",'fun':"EES_Sstyle(\"<Span style=text-align:center;display:block;>\",\"</Span>\")",'tip':"将选中的对象居中对齐",'class':"EES_Cbtn"},
'icoAgr':{'bgp':"-200px 0",'fun':"EES_Sstyle(\"<Span style=text-align:right;display:block;>\",\"</Span>\")",'tip':"将选中的对象右对齐",'class':"EES_Cbtn"},
//'icoAgl':{'bgp':"-160px 0",'fun':"EES_Sformat('justifyleft')",'tip':"左对齐",'class':"EES_Cbtn"},
//'icoAgc':{'bgp':"-180px 0",'fun':"EES_Sformat('justifycenter')",'tip':"居中对齐",'class':"EES_Cbtn"},
//'icoAgr':{'bgp':"-200px 0",'fun':"EES_Sformat('justifyright')",'tip':"右对齐",'class':"EES_Cbtn"},
'icoLul':{'bgp':"-220px 0",'fun':"EES_Sformat('insertorderedlist')",'tip':"编号列表",'class':"EES_Cbtn"},
'icoLol':{'bgp':"-240px 0",'fun':"EES_Sformat('insertunorderedlist')",'tip':"项目列表",'class':"EES_Cbtn"},
'icoLnk':{'bgp':"-260px 0",'fun':"EES_Slinkcj()",'tip':"对选中对象创建链接",'class':"EES_Cbtn"},
'icoUlk':{'bgp':"-280px 0",'fun':"EES_Sformat('Unlink');",'tip':"清除选中的连接",'class':"EES_Cbtn"},
'icoNft':{'bgp':"-300px 0",'fun':"EES_Sformat('RemoveFormat')",'tip':"清除选中的HTML格式",'class':"EES_Cbtn"},
'icoWord':{'bgp':"-320px 0",'fun':"EES_Sword()",'tip':"清除所有WORD格式",'class':"EES_Cbtn"},
'icoauto':{'bgp':"-340px 0",'fun':"EES_Sauto()",'tip':"整页自动排版",'class':"EES_Cbtn"},
//--------++++++++1
'icoBrd':{'bgp':"-360px 0",'fun':"EES_Seborder()",'tip':"参考线",'class':"EES_Cbtn"},
'line_1':{'bgp':"-580px 0",'fun':"",'tip':"",'class':"EES_Cmenuline"},
'icomy':{'bgp':"-380px 0",'fun':"EES_Smenushow(this,'EES_Imenumy')",'tip':"插入自定义",'class':"EES_Cbtn"},
'icoChar':{'bgp':"-400px 0",'fun':"EES_Opchar()",'tip':"插入特殊字符",'class':"EES_Cbtn"},
'icoEmot':{'bgp':"-420px 0",'fun':"EES_Opemot()",'tip':"插入表情",'class':"EES_Cbtn"},
'icoTable':{'bgp':"-440px 0",'fun':"EES_Optable()",'tip':"插入表格",'class':"EES_Cbtn"},
'icoMt':{'bgp':"-460px 0",'fun':"EES_Opmt()",'tip':"插入媒体(图片、动画、视频等)",'class':"EES_Cbtn"},
'icoAbout':{'bgp':"-480px 0",'fun':"EES_Opabout()",'tip':"关于编辑器",'class':"EES_Cbtn"},
'icoHtm':{'bgp':"-500px 0",'fun':"EES_Scodearea()",'tip':"HTML代码",'class':"EES_Cbtn"},
//--------++++++++2
'icoFul':{'bgp':"-520px 0",'fun':"EES_Sfullscreen()",'tip':"全屏编辑",'class':"EES_Cbtn"}
};
//--------++++++++1
//编辑器自定义下拉菜单
var EES_Mmy={
'page':{'name':"分页符",'fun':"EES_Sinto(\"0\")"},
'copyright':{'name':"版权文字",'fun':"EES_Sinto(\"1\")"},
'time':{'name':"当前时间",'fun':"EES_Sinto(\"2\")"},
'hr':{'name':"一条横线",'fun':"EES_Sinto(\"<hr>\")"},
'replace':{'name':"查找替换",'fun':"EES_Opreplace()"}
};
//编辑器框内的右键下拉菜单
if(EES_EESaiBrowser()=="IE"){
var EES_Mrighttan={
'cut':{'name':"剪切(Ctrl+X)",'fun':"EES_Sformat(\"Cut\")"},
'copy':{'name':"复制(Ctrl+C)",'fun':"EES_Sformat(\"Copy\")"},
'paste':{'name':"粘贴(Ctrl+V)",'fun':"EES_Sformat(\"Paste\")"},
'selectAll':{'name':"全选(Ctrl+A)",'fun':"EES_Sformat(\"selectAll\")"},
'delete':{'name':"删除(Delete)",'fun':"EES_Sformat(\"Delete\")"},
'indent':{'name':"增加缩进量",'fun':"EES_Sformat(\"indent\")"},
'outdent':{'name':"减少缩进量",'fun':"EES_Sformat(\"outdent\")"},
'code':{'name':"编辑选中代码",'fun':"EES_Scodeopen()"},
'view':{'name':"预览选中代码",'fun':"EES_Scodeview()"}
};
}else{
var EES_Mrighttan={
'undo':{'name':"撤销(Ctrl+Z)",'fun':"EES_Sformat(\"undo\")"},
'redo':{'name':"重做(Ctrl+Y)",'fun':"EES_Sformat(\"redo\")"},
'selectAll':{'name':"全选(Ctrl+A)",'fun':"EES_Sformat(\"selectAll\")"},
'delete':{'name':"删除(Delete)",'fun':"EES_Sformat(\"Delete\")"},
'indent':{'name':"增加缩进量",'fun':"EES_Sformat(\"indent\")"},
'outdent':{'name':"减少缩进量",'fun':"EES_Sformat(\"outdent\")"},
'code':{'name':"编辑选中代码",'fun':"EES_Scodeopen()"},
'view':{'name':"预览选中代码",'fun':"EES_Scodeview()"}
};
}
//以下是区分当前浏览类型的代码
//if(EES_EESaiBrowser()=="IE"){alert("我是 IE");}
//if(EES_EESaiBrowser()=="FF"){alert("我是 Firefox");}
//if(EES_EESaiBrowser()=="Opera"){alert("我是 Opera");}
//if(EES_EESaiBrowser()=="Safari"){alert("我是 Safari");}
function EES_EESaiBrowser(){
var userAgent=navigator.userAgent; //取得浏览器的userAgent字符串
var isOpera=userAgent.indexOf("Opera") > -1;
if (isOpera){return "Opera"}; //判断是否Opera浏览器
if (userAgent.indexOf("Firefox") > -1){return "FF";} //判断是否Firefox浏览器
if (userAgent.indexOf("Safari") > -1){return "Safari";} //判断是否Safari浏览器
if (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera){return "IE";};//判断是否IE浏览器
}
//--------++++++++2
//编辑器样式下拉菜单
var EES_Mstyle={
'h1':{'name':"标题一",'fun':"EES_Sstyle(\"<h1>\",\"</h1>\")"},
'h2':{'name':"标题二",'fun':"EES_Sstyle(\"<h2>\",\"</h2>\")"},
'h3':{'name':"标题三",'fun':"EES_Sstyle(\"<h3>\",\"</h3>\")"},
'h4':{'name':"标题四",'fun':"EES_Sstyle(\"<h4>\",\"</h4>\")"},
'h5':{'name':"标题五",'fun':"EES_Sstyle(\"<h5>\",\"</h5>\")"},
'h6':{'name':"标题六",'fun':"EES_Sstyle(\"<h6>\",\"</h6>\")"},
'h7':{'name':"标题七",'fun':"EES_Sstyle(\"<h7>\",\"</h7>\")"},
'sup':{'name':"上标",'fun':"EES_Sstyle(\"<sup>\",\"</sup>\")"},
'sub':{'name':"下标",'fun':"EES_Sstyle(\"<sub>\",\"</sub>\")"},
'strike':{'name':"删线",'fun':"EES_Sstyle(\"<strike>\",\"</strike>\")"},
'code':{'name':"代码",'fun':"EES_Sstyle(\"<Span style=display:block;margin:10px;border-color:#DDDD88;border-width:1px;border-style:solid;padding:5px;background:#FFFFDD;color:#666600;font-size:12px;><b>这是一段代码:</b><br><br>\",\"</Span>\")"},
'block':{'name':"引用",'fun':"EES_Sstyle(\"<Span style=display:block;margin:10px;border-color:#D8D8D8;border-width:1px;border-style:solid;padding:5px;background-color:#F5F5F5;color:#666666;font-size:12px;><b>这是一段引用的话:</b><br><br>\",\"</Span>\")"},
//--------++++++++1
'faguang':{'name':"发光字",'fun':"EES_Sstyle(\"<Span style=width:100%;filter:glow(color=#ffff00,strength=10)>\",\"</Span>\")"},
'xiaoli':{'name':"小立体字",'fun':"EES_Sstyle(\"<Span style=width:100%;filter:blur(add=1,direction=45,strength=2)>\",\"</Span>\")"},
'dali':{'name':"大立体字",'fun':"EES_Sstyle(\"<Span style=width:100%;filter:dropshadow(color=#999999,offx=2,offy=2,positive=1)>\",\"</Span>\")"},
//--------++++++++2
'shuword':{'name':"竖排古籍",'fun':"EES_Sstyle(\"<Span style=display:block;layout-flow:vertical-ideographic;>\",\"</Span>\")"}
};
//编辑器字体下拉菜单
var EES_Mziti={
'heiti':{'name':"黑体",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'songti':{'name':"宋体",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'lishu':{'name':"隶书",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'kaiti':{'name':"楷体",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'youyuan':{'name':"幼圆",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'Arial':{'name':"Arial",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'Arial Black':{'name':"Arial Black",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'Georgia':{'name':"Georgia",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'Times New Roman':{'name':"Times New Roman",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'Verdana':{'name':"Verdana",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"},
'impact':{'name':"impact",'fun':"EES_Sformat(\"FontName\",this.innerHTML)"}
};
var EES_Mtishi={'modcode':"当前代码模式,请返回编辑模式!"};
/* ---------------------------- 编辑器内容显示区域 ---------------------------- */
//编辑器css样式
function EES_Estyle(){
var style="<style type='text/css'>\
#"+EES_ESid+"{background:#"+EES_ESqy+";}\
.EES_Cmenubar{background:url("+EES_ESsm+EES_ESse+"EESaiEdit_bg.gif);padding-left:10px;overflow:hidden;}\
.EES_Cbtn{float:left;margin:3px 1px 3px 1px;width:20px;height:20px;cursor:pointer;background:url("+EES_ESsm+EES_ESse+"EESaiEdit_Tool.gif);}\
.EES_Cbtnr{float:left;margin:4px 0px 2px 2px;width:20px;height:20px;cursor:pointer;background:url("+EES_ESsm+EES_ESse+"EESaiEdit_Tool.gif);}\
.EES_Cbtnt{float:left;margin:3px 1px 3px 1px;width:20px;height:20px;cursor:pointer;background:url("+EES_ESsm+EES_ESse+"EESaiEdit_Tool.gif);}\
.EES_Cmenuline{float:left;background:url("+EES_ESsm+EES_ESse+"EESaiEdit_Tool.gif);width:1px;height:20px;margin:2px 2px;}\
.EES_Cmenu{position:absolute;display:none;width:323px;_width:287px;margin-top:10px;font-size:12px;border:1px solid #"+EES_ESsy+";background:#"+EES_ESqy+";overflow:hidden;z-index:1001;}\
.EES_Cmenux{position:absolute;display:none;width:100px;margin-top:10px;font-size:12px;border:1px solid #"+EES_ESsy+";background:#"+EES_ESqy+";overflow:hidden;z-index:1001;}\
.EES_Cmenux a{width:100%;display:block;margin:2px;padding:0px 2px;text-decoration:none;color:#"+EES_ESsy+";height:20px;line-height:20px;}\
.EES_Cmenux a:hover{background:#"+EES_ESby+";color:#"+EES_ESsy+";}\
a.EES_Ceesa,a.EES_Ceesa:link,a.EES_Ceesa:active,a.EES_Ceesa:visited{padding:0px;margin:0px;border:0px;display:block;width:15px;height:15px;border:#"+EES_ESby+" 1px solid;float:left;text-decoration:none;}\
a.EES_Ceesa:hover{border:#"+EES_ESsy+" 1px solid;text-decoration:none;}\
</style>";
document.write(style);
}
//当鼠标划上按钮
function EES_Emtr(obj){obj.className="EES_Cbtnr";}
//当鼠标离开按钮
function EES_Emtt(obj){obj.className="EES_Cbtnt";}
//创建菜单
function EES_Ecrtbutton(){
var item;
var bdDiv=document.createElement("div");
var tbDiv=document.createElement("div");
tbDiv.style.height=EES_Vrheit;
tbDiv.className="EES_Cmenubar";
for(var i in EES_Mtoolb){item=document.createElement("a");
item.href="javascript:void(0)";
item.style.backgroundPosition=EES_Mtoolb[i]["bgp"];
item.className=EES_Mtoolb[i]["class"];
item.title=EES_Mtoolb[i]["tip"];
item.setAttribute("onclick",EES_Mtoolb[i]["fun"]);
if(EES_Mtoolb[i]["class"] !="EES_Cmenuline"){item.setAttribute("onmouseover","EES_Emtr(this)");
item.setAttribute("onmouseout","EES_Emtt(this)");}
tbDiv.appendChild(item);}
bdDiv.appendChild(tbDiv);
return bdDiv.innerHTML;
}
/* ---------------------------- 编辑器区域下拉菜单选项 ---------------------------- */
//样式下拉
function EES_Emenustyle(){
var items="";
for(var i in EES_Mstyle){items+="<a href='javascript:void(0)' οnclick='"+EES_Mstyle[i]["fun"]+"'>"+EES_Mstyle[i]["name"]+"</a>";}
document.write("<div id='EES_Imenustyle' class='EES_Cmenux'>"+items+"</div>");
}
//字体下拉
function EES_Emenuziti(){
var items="";
for(var i in EES_Mziti){items+="<a href='javascript:void(0)' style='font-family:"+EES_Mziti[i]["name"]+"' title='"+EES_Mziti[i]["name"]+"' οnclick='"+EES_Mziti[i]["fun"]+"'>"+EES_Mziti[i]["name"]+"</a>";}
document.write("<div id='EES_Imenuziti' class='EES_Cmenux'>"+items+"</div>");
}
//字体大小
function EES_Emenusize(){
var items="";
var fz=0;
for(var i=1;i<=7;i++){fz=(i*10-i*3)>10?(i*10-i*3):12;
items+="<a href='javascript:void(0)' style='font-size:"+fz+"px;line-height:"+fz+"px;height:"+fz+"px;' title='"+i+"&#21495;' οnclick=\"EES_Sformat('FontSize',"+i+")\">"+i+"&#21495;</a>";}
document.write("<div id='EES_Imenusize' class='EES_Cmenux'>"+items+"</div>");
}
//颜色选择器菜单生成过程
//EESaiColor Start
function EES_EESaiColorG(EESaiColorX){
var EESaiColorHex=new Array('00','33','66','99','CC','FF')
var EESaiColorHexSp=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF')
var EESaiColor="";
var EESaiColorF="'";
for (i=0;i<2;i++){
for (j=0;j<6;j++){
if(i==0){
EESaiColor=EESaiColor+'<a class="EES_Ceesa" href="javascript:void(0)" style="cursor:pointer;background-color:#'+EESaiColorHex[j]+EESaiColorHex[j]+EESaiColorHex[j]+'" οnclick="EES_Scolor('+EESaiColorF+EESaiColorX+EESaiColorF+','+EESaiColorF+'#'+EESaiColorHex[j]+EESaiColorHex[j]+EESaiColorHex[j]+EESaiColorF+')"></a>'}
else{
EESaiColor=EESaiColor+'<a class="EES_Ceesa" href="javascript:void(0)" style="cursor:pointer;background-color:#'+EESaiColorHexSp[j]+'" οnclick="EES_Scolor('+EESaiColorF+EESaiColorX+EESaiColorF+','+EESaiColorF+'#'+EESaiColorHexSp[j]+EESaiColorF+')"></a>'}
for (k=0;k<3;k++){
for (l=0;l<6;l++){
EESaiColor=EESaiColor+'<a class="EES_Ceesa" href="javascript:void(0)" style="cursor:pointer;background-color:#'+EESaiColorHex[k+i*3]+EESaiColorHex[l]+EESaiColorHex[j]+'" οnclick="EES_Scolor('+EESaiColorF+EESaiColorX+EESaiColorF+','+EESaiColorF+'#'+EESaiColorHex[k+i*3]+EESaiColorHex[l]+EESaiColorHex[j]+EESaiColorF+')"></a>'
}}}}
return EESaiColor;
}
//EESaiColor End
//字体颜色
function EES_Emenucolor(){
var items="";
items=EES_EESaiColorG("0");
document.write("<div id='EES_Imenucolor' class='EES_Cmenu'>"+items+"</div>");
}
//背景颜色
function EES_Emenubgcolor(){
var items="";
items=EES_EESaiColorG("1");
document.write("<div id='EES_Imenubgcolor' class='EES_Cmenu'>"+items+"</div>");
}
//自定义下拉
function EES_Emenumy(){
var items="";
for(var i in EES_Mmy){items+="<a href='javascript:void(0)' title='"+EES_Mmy[i]["name"]+"' οnclick='"+EES_Mmy[i]["fun"]+"'>"+EES_Mmy[i]["name"]+"</a>";}
document.write("<div id='EES_Imenumy' class='EES_Cmenux'>"+items+"</div>");
}
//--------++++++++1
//编辑菜单
function EES_Emenux(){
var items="";
for(var i in EES_Mrighttan){items+="<a href='javascript:void(0)' title='"+EES_Mrighttan[i]["name"]+"' οnclick='"+EES_Mrighttan[i]["fun"]+"'>"+EES_Mrighttan[i]["name"]+"</a>";}
document.write("<div id='EES_Imenux' class='EES_Cmenux'>"+items+"</div>");
}
//--------++++++++2
/* ---------------------------- Func Area ---------------------------- */
//获取编辑器内容(全部)
function EES_EGetContent(){
EES_EDValue=EES_Ktextarea.value=EES_Ehtmsi(EES_CleanCode(EES_EDWindow.document.body.innerHTML));
if(document.getElementById(EES_ESid)){
if(isNaN(EES_ESlen)){EES_ESlen=1000;}
var obj=document.getElementById(EES_ESid);
var text=EES_EDValue.replace(/<\/?[^>]*>|[\r\n]/gi,"");
if(text.length>EES_ESlen){alert("注意:当前字符长度"+text.length+">"+EES_ESlen+"(限长).")}
obj.value=text.substr(0,EES_ESlen);}
if(document.getElementById(EES_ESan)){document.getElementById(EES_ESan).value=EES_EDValue;}
return EES_EDValue;
}
//检测按键执行动作
function EES_Ekyinput(e){if(e.keyCode==13){if(document.all){EES_Sincode("<br />");e.returnValue=false;}else{/*e.preventDefault();*/}}}
//获取编辑器中"&EEs_tcxz&"内容(动作)
function EES_EGetRange(){with(EES_EDWindow){focus();
if(document.all){return document.selection.createRange();}else{var selection=getSelection();
return selection.getRangeAt(selection.rangeCount-1).cloneRange();}}}
//获取编辑器内容("&EEs_tcxz&"部分)
function EES_EGetContentPart(){
var oRange=EES_EGetRange();
if(document.all){return oRange.htmlText;}else{var contents=oRange.cloneContents();
var cnt=document.createElement("div");
cnt.appendChild(contents);
return cnt.innerHTML;}
}
//向编辑器中插入代码
function EES_Sincode(sHTML){
if(!EES_EDMode){alert(EES_Mtishi['modcode']);return;}
var oRange=EES_EGetRange();
if(document.all){oRange.pasteHTML(sHTML);}else{var oFrag=oRange.createContextualFragment(sHTML);
oRange.deleteContents();
oRange.insertNode(oFrag);}
EES_Emenug();
}
//给内容加样式
function EES_Sstyle(Mark1,Mark2){
if(!EES_EDMode){alert(EES_Mtishi['modcode']);return;}
with(EES_EDWindow){focus();
var oRange=EES_EGetRange();
var html=EES_EGetContentPart();
if(html!=""){
html=Mark1+html+Mark2
if(document.all){oRange.pasteHTML(html);}else{var oFrag=oRange.createContextualFragment(html);
oRange.deleteContents();
oRange.insertNode(oFrag);}}
EES_Emenug();}
}
//文字背景与文字颜色
function EES_Scolor(Scty,Scstr){
if(!EES_EDMode){alert(EES_Mtishi['modcode']);return;}
with(EES_EDWindow){focus();
var oRange=EES_EGetRange();
var html=EES_EGetContentPart();
if(html!=""){
if(Scty=="0"){
html="<FonT ColoR=\""+Scstr+"\">"+html+"</FonT>"
}else{
html="<SpaN StylE=\"background-color:"+Scstr+"\">"+html+"</SpaN>"
}
if(document.all){oRange.pasteHTML(html);}else{var oFrag=oRange.createContextualFragment(html);
oRange.deleteContents();
oRange.insertNode(oFrag);}}
EES_Emenug();}
}
//向内容中插入
function EES_Sinto(Mark1){
if(!EES_EDMode){alert(EES_Mtishi['modcode']);return;}
with(EES_EDWindow){focus();
var oRange=EES_EGetRange();
var html=Mark1;
if(html!=""){
if(html=="0"){html=EES_pg}
if(html=="1"){html=EES_cr}
if(html=="2"){html=new Date();}
if(document.all){oRange.pasteHTML(html);}else{var oFrag=oRange.createContextualFragment(html);
oRange.deleteContents();
oRange.insertNode(oFrag);}}
EES_Emenug();}
}
//JS编辑器常规命令
function EES_Sformat(what,opt){
if(!EES_EDMode){alert(EES_Mtishi['modcode']);return;}
with(EES_EDWindow){focus();
if(!opt){document.execCommand(what,false,null);}else{if(document.all){document.execCommand(what,"",opt);
}else{document.execCommand(what,false,opt);}}}
EES_Emenug();
}
//显示下来菜单 Show Menu EES_Imenuziti,EES_Imenusize,EES_Imenucolor
function EES_Smenushow(obj,menuID){
EES_Emenug();
var w=document.defaultView? document.defaultView.getComputedStyle(obj,null).width:obj.currentStyle.width;
var h=document.defaultView? document.defaultView.getComputedStyle(obj,null).height:obj.currentStyle.height;
var x=EES_Emux(obj)+"px";
var y=(EES_Emuy(obj)+parseInt(h)-2)+"px";
menu=document.getElementById(menuID);
menu.style.left=x;
menu.style.top=y;
menu.style.display="block";
EES_EDCurGMenuId=menuID;
}
//显示下拉菜单
function EES_Emenuk(e){
EES_Emenug();
var menuID="EES_Imenux";
var x=(EES_Emux(EES_Kiframe)+e.clientX)+"px";
var y=(EES_Emuy(EES_Kiframe)+e.clientY)+"px";
menu=document.getElementById(menuID);
menu.style.left=x;
menu.style.top=y;
menu.style.display="block";
EES_EDCurGMenuId=menuID;
}
//隐藏所有已下拉菜单
function EES_Emenug(){EES_EGetContent();
if(EES_EDCurGMenuId){document.getElementById(EES_EDCurGMenuId).style.display="none";
EES_EDCurGMenuId="";}}
//--------++++++++1
//显示隐藏HTML编码区域Show And Hidden Code Area
function EES_Scodearea(){
var selects=document.getElementsByTagName("select");
if(EES_Ktextarea.style.display=="none"){EES_Ktextarea.style.display="";
EES_Kiframe.style.display="none";
EES_EDMode=0;}else{EES_EDWindow.document.body.innerHTML=EES_Ktextarea.value;
EES_Ktextarea.style.display="none";
EES_Kiframe.style.display="";
EES_EDMode=1;}
EES_Esxy();
EES_Emenug();
}
//打代码或预览窗口过程
function EES_Ewinopen(url,w,h){
if(EES_Edialog==null || EES_Edialog.closed){EES_Edialog=window.open(url,"","width="+w+",height="+h+",top,left,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");}else{EES_Edialog.location.href=url;
EES_Edialog.focus();}
}
//打开代码窗口
function EES_Scodeopen(){
EES_Emenug();
var html=EES_EGetContentPart();
EES_Ewinopen("about:blank",400,300);
EES_Edialog.document.open();
EES_Edialog.document.write("<textarea id='code' style='width:100%;height:90%;'>"+html+"</textarea>");
EES_Edialog.document.write("<input type='button' value='提交' οnclick='opener.EES_Sincode(document.getElementById(\"code\").value);opener.EES_EGetContent();self.close();' />");
EES_Edialog.document.close();
}
//打开预览窗口
function EES_Scodeview(){
EES_Emenug();
var html=EES_EGetContentPart();
EES_Ewinopen("about:blank",400,300);
EES_Edialog.document.open();
EES_Edialog.document.write(""+html+"");
EES_Edialog.document.write("<br><hr><br><input type='button' value='关闭' οnclick='opener.EES_EGetContent();self.close();' />");
EES_Edialog.document.close();
}
//显示参考线Show And Hidden Edit->document.body Elements Borders
function EES_Seborder(){var oCssRules;
var cssTxt="span{border:1px dotted #"+EES_ESsy+";}div{border:1px double #"+EES_ESsy+";}p{border:1px dashed #"+EES_ESsy+";}table{border:1px solid #"+EES_ESsy+";}td{background-color:#"+EES_ESqy+";}";
with(EES_EDWindow){oCssRules=document.styleSheets[0].ownerNode || document.styleSheets[0];}
if(document.all){if(oCssRules.cssText==""){oCssRules.cssText=cssTxt;}else{oCssRules.cssText="";}}else{if(oCssRules.innerHTML==""){oCssRules.innerHTML=cssTxt;}else{oCssRules.innerHTML="";}}}
//--------++++++++2
//创建链接的弹窗命令
function EES_Slinkcj(){if(document.all){document.execCommand("CreateLink",true,true);}else{var sURL=window.prompt("请输入链接:(例如:http://www.eesai.com/):","http://");
if((sURL !=null) &&(sURL !="http://") &&(sURL!="")){EES_Sformat("CreateLink",sURL);}else{return false;}}
EES_Emenug();}
//全屏编辑器的命令
function EES_Sfullscreen(){
var oHtml=document.getElementsByTagName("html");
var sl=parseInt(document.body.scrollLeft);
var st=parseInt(document.body.scrollTop);
if(EES_SfullscreenMode==1){document.body.style.width=document.body.style.height="";
document.body.style.overflow="";
oHtml[0].style.overflow="";
EES_EDDiv.style.position="";
EES_EDDiv.style.zIndex="";
EES_Kiframe.style.width=EES_Ktextarea.style.width=EES_EDDiv.style.width=EES_Vrwid;
EES_Kiframe.style.height=EES_Ktextarea.style.height=EES_Vrheic;
EES_EDDiv.style.height=EES_Vrhei;
EES_SfullscreenMode=0;}else{oHtml[0].style.overflow="hidden";
document.body.style.overflow=document.all? "hidden":"visible";
document.body.style.width=document.body.style.height=0;
var page=EES_Esizegt();
EES_EDDiv.style.position="absolute";
EES_EDDiv.style.zIndex=1000;
EES_EDDiv.style.left=sl+"px";
EES_EDDiv.style.top=st+"px";
EES_Kiframe.style.width=EES_Ktextarea.style.width=EES_EDDiv.style.width=page[2]+"px";
EES_Kiframe.style.height=EES_Ktextarea.style.height=EES_EDDiv.style.height=(page[3]-parseInt(EES_Vrheit))+"px";
EES_SfullscreenMode=1;}
document.body.scrollLeft=sl;
document.body.scrollTop=st;
EES_Esxy();
}
//获取下拉菜单的横坐标值
function EES_Emux(e){var l=e.offsetLeft;while(e=e.offsetParent){l+=e.offsetLeft;}return l;}
//获取下拉菜单的竖坐标值
function EES_Emuy(e){var t=e.offsetTop;while(e=e.offsetParent){t+=e.offsetTop;}return t;}
//定义编辑器区域鼠标与键盘动作
function EES_EAddEventHandler(Target,EventType,Handler){if(Target.attachEvent){Target.attachEvent("on"+EventType,Handler);}else if(Target.addEventListener){Target.addEventListener(EventType,Handler,false);}else{Target["on"+EventType]=Handler;}}
//当鼠标离开编辑器按钮时候触发的动作
function EES_Smgo(e){EES_Emenug();}
//当鼠标抵达编辑器按钮时候触发的动作
function EES_Smon(e){EES_Emenug();EES_Emenuk(e);if(document.all){return false;}else{e.preventDefault();}}
//当鼠标离开按钮或弹起时的动作
function EES_Smup(e){EES_Emenug();if(document.all){EES_EDCurGEditor=e.srcElement.document.parentWindow;}else{EES_EDCurGEditor=e.target.ownerDocument.defaultView;}}
//当键盘按键抬起时候的动作
function EES_Skup(e){EES_Emenug();}
//当键盘按键按下时候的动作
function EES_Skon(e){EES_Ekyinput(e);EES_Emenug();}
//显示或隐藏下拉
function EES_Esxy(){var selects=document.getElementsByTagName("select");if(selects){for(var i in selects){if(selects[i].tagName && selects[i].tagName.toLowerCase()=="select"){selects[i].style.visibility=EES_SfullscreenMode==1? "hidden":"visible";}}}}
//简化代码 <BR>=><br />,<p></P>=><br />,<div></div>=><span></span>
function EES_Ehtmsi(html){
html=html.replace(/<(img [^>]+)>/gi,'<$1 \/>');
html=html.replace(/<(input [^>]+)>/gi,'<$1 \/>');
html=html.replace(/<\/?(BR|HR)[^>]*>/gi,'<$1 \/>');
var re=new RegExp("(<DIV)([^>]*>.*?)(<\/DIV>)","gi");
html=html.replace(re,"<P$2</P>");
html=html.replace(/<P[^>]*>/gi,"");
html=html.replace(/<\/P[^>]*>/gi,"<br />");
html=html.replace(/</gi,"&lt;");
html=html.replace(/>/gi,"&gt;");
return html;
}
//全屏时候获取浏览器长宽
function EES_Esizegt(){
var xScroll,yScroll;
if(window.innerHeight && window.scrollMaxY){xScroll=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;
yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;
yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;
if(self.innerHeight){windowWidth=self.innerWidth;
windowHeight=self.innerHeight;}else if(document.documentElement && document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;
windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
//获取并处理编辑框架返回的内容
function EES_CleanCode(s){
var htmlPattern=new RegExp('<[ ]*([\\w]+).*?>','gi');
s=s.replace(htmlPattern,
function(ref){var cleanStartTag="";
var ref=ref.replace('^<[ ]*','<');
var ndx=ref.search(/\s/);
var tagname=ref.substring(0,ndx);
var attributes=ref.substring(ndx,ref.length);
if(ndx==-1) return ref.toLowerCase();
cleanStartTag+=tagname.toLowerCase();
var pairs=attributes.match(/[\w]+\s*=\s*("[^"]*"|[^">\s]*)/gi);
if(pairs){for(var t=0;t<pairs.length;t++){var pair=pairs[t];
var ndx=pair.search(/=/);
var attrname=pair.substring(0,ndx).toLowerCase();
if(attrname.match(/on\w+/i)){continue;}var attrval=pair.substring(ndx,pair.length);
var wellFormed=new RegExp('=[ ]*"[^"]*"',"g");
if(!wellFormed.test(attrval)){var attrvalPattern=new RegExp('=(.*?)','g');
attrval=attrval.replace(attrvalPattern,'=\"$1');
attrval+='"';}var attr=attrname+attrval;
cleanStartTag+=" "+attr;}}
cleanStartTag+=">";
return cleanStartTag;});
s=s.replace(/<\/\s*[\w]*\s*>/g,
function(ref){return ref.toLowerCase();});
return s;
}
//处理编辑器多余的word格式
function EES_Sword(){
var html=EES_EGetContent();
html='<i id="EESaiEDIT6"></i>  '+html//For the autodo--1
html=html.replace(/[ | ]*\n/g,''); //去除行尾空白
html=html.replace(/\r/g,'');
html=html.replace(/\n/g,'');
EES_EDWindow.document.body.innerHTML=html;
document.getElementById(EES_ESan).value=html;
}
//全自动纯文本排版
function EES_Sauto(){
var html=EES_EGetContent();
//清理特定的HTML标签
html=html.replace(/<STYLE[^>]*>[\s\S]*?<\/STYLE>/gi,'');
html=html.replace(/<SCRIPT[^>]*>[\s\S]*?<\/SCRIPT>/gi,'');
//替换掉需要保留的标签,比如换行
html=html.replace(/\<br[^>]*>/gi,"[$br]");
html=html.replace(/\<img([^>]*)>/gim,"[img$1]");
//清理全部HTML标签
html=html.replace(/\<[^>]*>/g,"");
html=html.replace(/[ | ]*\n/g,''); //去除行尾空白
html=html.replace(/\n[\s| | ]*\r/g,''); //去除多余空行
html=html.replace(/(^\s*)|(\s*$)/g,'');//去除行前行尾空格
//替换回需要保留的标签
html=html.replace(/ /ig,' ');//去掉
html=html.replace(/  /ig,' ');//去掉
EES_EDWindow.document.body.innerHTML=html;
document.getElementById(EES_ESan).value=html;
}
//插入弹窗返回的代码
function EES_Opcode(value){if(value){EES_Sincode(""+value+"");}}
//说明弹窗
function EES_Opabout(){if(EES_ESpop!=""){EES_Opcode(window.prompt("关于编辑器:","阿赛HTML在线编辑器[EESaiEdit]"));}else{EES_Opcode(showModalDialog(""+EES_ESsm+EES_ESse+"Pop/about.htm",window,"dialogWidth:520px;dialogHeight:320px;status:0;help:0;scroll:no;"));}}
//--------++++++++1
//替换功能弹窗
function EES_Opreplace(){if(EES_ESpop!=""){EES_Opreplaces(window.prompt("请输入地址(例如:http://www.eesai.com/):","http://"));}else{EES_Opreplaces(showModalDialog(""+EES_ESsm+EES_ESse+"Pop/replace.htm",window,"dialogWidth:280px;dialogHeight:180px;status:0;help:0;scroll:no;"));}}
//查找替换
function EES_Opreplaces(value){
if(value){
if(EES_ESpop!=""){var mtarr=value.split(""+EES_ESpop+"");}else{var mtarr=value.split("|*|");}
var html=EES_EGetContent();
if(mtarr[2]==1){html=EES_Erecode(html,mtarr[0],mtarr[1],true);}
else{html=EES_Erecode(html,mtarr[0],mtarr[1]);};
EES_EDWindow.document.body.innerHTML=html;}
}
function EES_Erecode(s,a,b,i)
{a =a.replace("?","\\?");
if(i==null){
var r =new RegExp(a,"gi");
}else if(i) {
var r =new RegExp(a,"g");
}else{
var r =new RegExp(a,"gi");}
return s.replace(r,b);
}
//插入特殊字符弹窗
function EES_Opchar(){if(EES_ESpop!=""){EES_Opcode(window.prompt("请输入字符(例如:★☆◆◇■□▲△):","★"));}else{EES_Opcode(showModalDialog(""+EES_ESsm+EES_ESse+"Pop/char.htm",window,"dialogWidth:520px;dialogHeight:390px;status:0;help:0;scroll:no;"));}}
//插入表情弹窗
function EES_Opemot(){if(EES_ESpop!=""){EES_Opcode(window.prompt("请输入表情图片(格式:<img scr=表情地址>):","<img scr=http://www.eesai.com/logo.gif>"));}else{EES_Opcode(showModalDialog(""+EES_ESsm+EES_ESse+"Pop/emot.htm",window,"dialogWidth:365x;dialogHeight:365px;status:0;help:0;scroll:no;"));}}
//插入表格弹窗
function EES_Optable(){if(EES_ESpop!=""){EES_Optables(window.prompt("请输入表格编码(格式:行数"+EES_ESpop+"列数"+EES_ESpop+"宽"+EES_ESpop+"边框"+EES_ESpop+"单元边距"+EES_ESpop+"单元间距"+EES_ESpop+"背景颜色"+EES_ESpop+"边框颜色):","3"+EES_ESpop+"3"+EES_ESpop+""+EES_ESpop+""+EES_ESpop+""+EES_ESpop+""+EES_ESpop+""+EES_ESpop+""));}else{EES_Optables(showModalDialog(""+EES_ESsm+EES_ESse+"Pop/table.htm",window,"dialogWidth:333px;dialogHeight:240px;status:0;help:0;scroll:no;"));}}
function EES_Optables(value){
if(value){
if(EES_ESpop!=""){var tbarr=value.split(""+EES_ESpop+"");}else{var tbarr=value.split("|*|");}
if(parseInt(tbarr[0])>0){tbh=parseInt(tbarr[0]);}else{tbh=1;}
if(parseInt(tbarr[1])>0){tbl=parseInt(tbarr[1]);}else{tbl=1;}
code="<table";
if(tbarr[2]!=""){code=code+" width=\""+tbarr[2]+"\"";}
if(tbarr[3]!=""){code=code+" border=\""+tbarr[3]+"\"";}
if(tbarr[4]!=""){code=code+" cellpadding=\""+tbarr[4]+"\"";}
if(tbarr[5]!=""){code=code+" cellspacing=\""+tbarr[5]+"\"";}
if(tbarr[6]!=""){code=code+" bgcolor=\""+tbarr[6]+"\"";}
if(tbarr[7]!=""){code=code+" bordercolor=\""+tbarr[7]+"\"";}
code=code+"><tbody>";
for(i=0;i<tbh;i++)
{code=code+"<tr>";
for(j=0;j<tbl;j++){code=code+"<td></td>";}
code=code+"</tr>";}
code=code+"</tbody></table>"
EES_Sincode(code);}
}
//插入图片、视频、音乐等文件
function EES_Opmt(){if(EES_ESpop!=""){EES_Opmts(window.prompt("请输入媒体编码(格式:宽"+EES_ESpop+"高"+EES_ESpop+"媒体地址):",""+EES_ESpop+""+EES_ESpop+"http://www.eesai.com/logo.gif"));}else{EES_Opmts(showModalDialog(""+EES_ESsm+EES_ESse+"Pop/mt.htm",window,"dialogWidth:520px;dialogHeight:160px;status:0;help:0;scroll:no;"));}}
function EES_Opmts(value){
if(value){
var mtmw=480;
var mtmh=360;
if(EES_ESpop!=""){var mtarr=value.split(""+EES_ESpop+"");}else{var mtarr=value.split("|*|");}
var mtarrext=value.split(".");
var mtext=mtarrext[mtarrext.length-1].toLowerCase();
if(mtarr[0]!=""){mtmw=mtarr[0];}
if(mtarr[1]!=""){mtmh=mtarr[1];}
switch(mtext){case "gif":case "jpg":case "jepg":case "png":case "bmp":
code="<img src=\""+mtarr[2]+"\"";
if(mtarr[0]!=""){code=code+" width=\""+mtarr[0]+"\"";}
if(mtarr[1]!=""){code=code+" height=\""+mtarr[1]+"\"";}
code=code+" />";
break;
case "avi":case "wmv":case "asf":case "mp3":case "wma":case "mpg":case "mpeg":case "mp4":case "3gp":
code="<script>document.write(unescape('%3Cobject'));"
code=code+"document.write(' width=\""+mtmw+"\" height=\""+mtmh+"\"');"
code=code+"document.write(unescape('%20classid%3D%22CLSID%3A6BF52A52-394A-11d3-B153-00C04F79FAA6%22%3E%3Cparam%20name%3D%22url%22%20value%3D%22'));"
code=code+"document.write('"+mtarr[2]+"');"
code=code+"document.write(unescape('%22%3E%3C/object%3E'));</script>";
break;
case "rm":case "ra":case "ram":case "rmvb":
code="<script>document.write(unescape('%3Cobject%20classid%3D%22clsid%3AF3D0D36F-23F8-4682-A195-74C92B03D4AF%22'));";
code=code+"document.write(' width=\""+mtmw+"\" height=\""+mtmh+"\"');";
code=code+"document.write(unescape('%20id%3D%22QvodPlayer%22%20name%3D%22QvodPlayer%22%20onerror%3D%22if%28window.confirm%28%27%u963F%u8D5B%u5DE5%u4F5C%u5BA4%u63D0%u793A%u4F60%uFF1A%u8BF7%u70B9%u51FB%u94FE%u63A5%u8FDB%u5165%u5B98%u7F51%u4E0B%u8F7D%u89C6%u9891%u3001%u97F3%u9891%u64AD%u653E%u8F6F%u4EF6%u3002%27%29%29%7Bwindow.open%28%27http%3A//www.eesai.com/%3Fdown/zyjzdh/info/AID3200QVOD.html%27%29%7Delse%7Bself.location%3D%27http%3A//www.eesai.com/%27%7D%22%3E%3Cparam%20name%3D%22URL%22%20value%3D%22'));";
code=code+"document.write('"+mtarr[2]+"');";
code=code+"document.write(unescape('%22%3E%3Cparam%20name%3D%22Autoplay%22%20value%3D%221%22%3E%3C/object%3E'));</script>";
break;
case "swf":case "flv":
code="<embed src=\""+mtarr[2]+"\" allowFullScreen=\"true\" quality=\"high\" width=\""+mtmw+"\" height=\""+mtmh+"\" align=\"middle\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\"></embed>"
break;
default:
code="<a target=\"_blank\" title=\"点击查看\" href=\""+mtarr[2]+"\">"+mtarr[2]+"</a>";}
EES_Sincode(code);}
}
//--------++++++++2
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值