📄 newsadd1.asp
字号:
if(xsel.cellPadding!=""&&xsel.cellPadding!=null){tablecellpadding=xsel.cellPadding;}else{tablecellpadding="";}
if(xsel.cellSpacing!=""&&xsel.cellSpacing!=null){tablecellspacing=xsel.cellSpacing;}else{tablecellspacing="";}
if(xsel.borderColor!=""&&xsel.borderColor!=null){tablebordercolor=xsel.borderColor;}else{tablebordercolor="";}
if(xsel.bgColor!=""&&xsel.bgColor!=null){tablebackgroundcolor=xsel.bgColor;}else{tablebackgroundcolor="";}
tableiscancel="";
window.showModalDialog("editor_tableprops.asp",window," dialogWidth: 350px; dialogHeight: 300px; help: no;scroll: no; status: no");
if(tableiscancel=="no"){
if(tablewidthspecified=="yes"){
var tw1="";
if(tablewidthtype=="percentage"){
tw1=tablewidth+"%";
}else{
tw1=tablewidth;
}
xsel.width=tw1;
}else{
xsel.removeAttribute("width",0);
}
if(tablealign!=""&&tablealign!="Default"){xsel.align=tablealign;}else{xsel.removeAttribute("align",0);}
if(tableclass!=""&&tableclass!="Default"){xsel.className=tableclass;}else{xsel.removeAttribute("className",0);}
if(tablebordersize!=""&&tablebordersize!=null){xsel.border=tablebordersize;}else{xsel.removeAttribute("border",0);}
if(tablecellpadding!=""&&tablecellpadding!=null){xsel.cellPadding=tablecellpadding;}else{xsel.removeAttribute("cellPadding",0);}
if(tablecellspacing!=""&&tablecellspacing!=null){xsel.cellSpacing=tablecellspacing;}else{xsel.removeAttribute("cellSpacing",0);}
if(tablebordercolor!=""&&tablebordercolor!="Default"){xsel.borderColor=tablebordercolor;}else{xsel.removeAttribute("borderColor",0);}
if(tablebackgroundcolor!=""&&tablebackgroundcolor!="Default"){xsel.bgColor=tablebackgroundcolor;}else{xsel.removeAttribute("bgColor",0);}
}
}
}
function cellProp(){
var cellflag=false;
message.focus();
var xsel=message.document.selection;
var xobj=message.document.selection.createRange();
if(xsel.type=="None"||xsel.type=="Text"){
xsel=xobj.parentElement();
while(xsel.tagName!="BODY"&&cellflag==false){
if(xsel.tagName=="TD"){cellflag=true;}
if(cellflag==false){xsel=xsel.parentElement;}
}
}else if(xsel.type=="Control"){
xsel=xobj.item(0);
if(xsel.tagName=="TD"){
cellflag=true;
}else{
while(xsel.tagName!="BODY"&&cellflag==false){
if(xsel.tagName=="TD"){cellflag=true;}
if(cellflag==false){xsel=xsel.parentElement;}
}
}
}
if(cellflag==true){
if(xsel.width!=""&&xsel.width!=null){tablewidthspecified="yes";tablewidth=xsel.width;}else{tablewidthspecified="no";tablewith="";}
if(xsel.align!=""&&xsel.align!=null){tablealign=xsel.align;}else{tablealign="";}
if(xsel.className!=""&&xsel.className!=null){tablecellclass=xsel.className;}else{tablecellclass="";}
if(xsel.vAlign!=""&&xsel.vAlign!=null){tablevalign=xsel.vAlign;}else{tablevalign="";}
if(xsel.borderColor!=""&&xsel.borderColor!=null){tablebordercolor=xsel.borderColor;}else{tablebordercolor="";}
if(xsel.bgColor!=""&&xsel.bgColor!=null){tablebackgroundcolor=xsel.bgColor;}else{tablebackgroundcolor="";}
tableiscancel="";
window.showModalDialog("editor_cellprops.asp",window,"dialogWidth: 400px; dialogHeight: 230px;help: no;scroll: no; status: no");
if(tableiscancel=="no"){
if(tablewidthspecified=="yes"){
var tw1="";
if(tablewidthtype=="percentage"){tw1=tablewidth+"%";}else{tw1=tablewidth;}
xsel.width=tw1;
}else{
xsel.removeAttribute("width",0);
}
if(tablealign!=""&&tablealign!="Default"){xsel.align=tablealign;}else{xsel.removeAttribute("align",0);}
if(tablevalign!=""&&tablevalign!="Default"){xsel.vAlign=tablevalign;}else{xsel.removeAttribute("vAlign",0);}
if(tablecellclass!=""&&tablecellclass!="Default"){xsel.className=tablecellclass;}else{xsel.removeAttribute("className",0);}
if(tablebordercolor!=""&&tablebordercolor!="Default"){xsel.borderColor=tablebordercolor;}else{xsel.removeAttribute("borderColor",0);}
if(tablebackgroundcolor!=""&&tablebackgroundcolor!="Default"){xsel.bgColor=tablebackgroundcolor;}else{xsel.removeAttribute("bgColor",0);}
}
}
}
function table_ir()
{
tablecommand("ir");
}
function table_dr()
{
tablecommand("dr");
}
function table_ic()
{
tablecommand("ic");
}
function table_dc()
{
tablecommand("dc");
}
function table_mc()
{
tablecommand("mc");
}
function table_md()
{
tablecommand("md");
}
function table_sc()
{
tablecommand("sc");
}
function InsertTable()
{
if (! validateMode()) return;
message.focus();
var range = message.document.selection.createRange();
var arr = showModalDialog("editor_inserttable.asp", "", "dialogWidth:450px;dialogHeight:200px;help: no; scroll: no; status: no");
if (arr != null){
range.pasteHTML(arr);
}
message.focus();
}
function about()
{
window.showModalDialog("about.htm","","dialogWidth:420px;dialogHeight:240px;scroll:no;status:no;help:no");
}
function validateMode()
{
if (!bTextMode) return true;
alert("请先取消查看HTML源代码,进入“编辑”状态,然后再使用系统编辑功能!");
message.focus();
return false;
}
function validateModea()
{
if (!bTextMode) return true;
alert("请先取消查看HTML源代码!");
message.focus();
return false;
}
function InsertChars(CharIndex)
{
if (! validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var Chars=new Array("<br>","©","®","™","•");
range.pasteHTML(Chars[CharIndex]);
message.focus();
}
function Insertface(faceIndex)
{
if (! validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var Chars=new Array("<IMG src='uploadfile/newsface/1.gif' border=0>","<IMG src='uploadfile/newsface/2.gif' border=0>","<IMG src='uploadfile/newsface/3.gif' border=0>","<IMG src='uploadfile/newsface/4.gif' border=0>","<IMG src='uploadfile/newsface/5.gif' border=0>","<IMG src='uploadfile/newsface/6.gif' border=0>","<IMG src='uploadfile/newsface/7.gif' border=0>","<IMG src='uploadfile/newsface/8.gif' border=0>","<IMG src='uploadfile/newsface/9.gif' border=0>","<IMG src='uploadfile/newsface/10.gif' border=0>");
range.pasteHTML(Chars[faceIndex]);
message.focus();
}
function InsertEQ()
{
if (! validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var arr = showModalDialog("editor_inserteq.asp", "", "dialogWidth:40em; dialogHeight:20em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
var str1;
str1="<applet codebase='./' code='webeq3.ViewerControl' WIDTH=320 HEIGHT=100>"
str1=str1+"<PARAM NAME='parser' VALUE='mathml'><param name='color' value='"+b+"'><PARAM NAME='size' VALUE='18'>"
str1=str1+"<PARAM NAME=eq id=eq VALUE='"+a+"'></applet>"
range.pasteHTML(str1);
}
message.focus();
}
function InstallEQ()
{
window.open ("editor_inserteq.asp?Action=Install", "", "height=200, width=300,left="+(screen.AvailWidth-300)/2+",top="+(screen.AvailHeight-200)/2+", toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no")
}
function help()
{
var helpmess;
helpmess="---------------填写帮助---------------\r\n\r\n"+
"1.请不要发表有危险性的脚本。\r\n\r\n"+
"2.如果要书写源代码,请选中\r\n\r\n"+
" 查看HTML源代码书写.\r\n\r\n"+
"3.需要你自己运行,才能看效果.\r\n\r\n"+
"4.如果书写js,尽量不要在这儿书写.\r\n\r\n";
alert(helpmess);
}
</script><script language="JavaScript">
function Check(t,n)
{
if(n==1) t.className ="Up"
else
if(n==2) t.className ="Down"
else t.className ="None"
}
function findstr()
{
if (! validateMode()) return;
var arr = showModalDialog("editor_find.asp", window, "dialogWidth:420px; dialogHeight:150px; help: no; scroll: no; status: no");
}
function calculator()
{
message.focus();
var range =message.document.selection.createRange();
var arr = showModalDialog("editor_calculator.asp", "", "dialogWidth:207px; dialogHeight:216px; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
var str1;
str1=""+a+""
range.pasteHTML(str1);
}
message.focus();
}
function nowdate()
{
if (! validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var d = new Date();
var str1=d.getYear()+"年"+(d.getMonth() + 1)+"月"+d.getDate() +"日";
range.pasteHTML(str1);
message.focus();
}
function nowtime()
{
if (! validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var d = new Date();
var str1=d.getHours() +":"+d.getMinutes()+":"+d.getSeconds();
range.pasteHTML(str1);
message.focus();
}
function excel()
{
if (! validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var str1="<object classid='clsid:0002E510-0000-0000-C000-000000000046' id='Spreadsheet1' codebase='file:\\Bob\software\office2000\msowc.cab' width='100%' height='250'><param name='EnableAutoCalculate' value='-1'><param name='DisplayTitleBar' value='0'><param name='DisplayToolbar' value='-1'><param name='ViewableRange' value='1:65536'></object>";
range.pasteHTML(str1);
message.focus();
}
function fortable()
{if (!validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var arr = showModalDialog("table.html", "", "dialogWidth:22em; dialogHeight:20em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
e=ss[4];
f=ss[5];
g=ss[6];
h=ss[7];
var string;
string="<table border="+d+" cellpadding="+e+" cellspacing="+f+" style='border-collapse: collapse' bordercolor="+g+" bgcolor="+h+" width=100 align="+c+">";
for(i=1;i<=a;i++){
string=string+"<tr>";
for(j=1;j<=b;j++){
string=string+"<td width="+100/a+"%></td>";
}
string=string+"</tr>";
}
string=string+"</table>";
range.pasteHTML(string);
}
else message.focus();
}
function swf()
{if (!validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var arr = showModalDialog("flash.asp", "", "dialogWidth:19em; dialogHeight:18em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
e=ss[4];
f=ss[5];
g=ss[6];
h=ss[7];
j=ss[8];
var string;
string="<table align="+g+"><tr><td><object width='"+e+"' height='"+f+"' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'><param name=movie value='"+a+"'><param name=quality value=high><param name='Play' value='"+b+"'><param name='Loop' value='"+c+"'><param name='Menu' value='"+d+"'><embed src='"+a+"' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed></object><br>"+h+"</td></tr></table>"
form1.PicUrl.value=a;
form1.PicList.options[form1.PicList.length] = new Option(a,a);
range.pasteHTML(string);
}
else message.focus();
}
function wmv()
{if (!validateMode()) return;
message.focus();
var range =message.document.selection.createRange();
var arr = showModalDialog("media.asp", "", "dialogWidth:19em; dialogHeight:18em; status:0;help:0");
if (arr != null){
var ss;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -