?? design.js
字號:
<script>
function Pic(cx){
if (!validateMode()) return;
if (cx == 1) {
var arr = showModalDialog("Inc/Pic.asp?Action=a", "", "dialogWidth:390Px; dialogHeight:308Px; status:0;scroll:no;help:0");
}
if (cx == 2) {
var arr = showModalDialog("Inc/Pic.asp?Action=b", "", "dialogWidth:390Px; dialogHeight:230Px; status:0;scroll:no;help:0");
}
message.focus();
var range =message.document.selection.createRange();
var FormUrlxx =document.Form.PicUrl.value;
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
c=ss[1];
d=ss[2];
e=ss[3];
f=ss[4];
g=ss[5];
h=ss[6];
i=ss[7];
j=ss[8];
var str1;
if (a == "") {}else{
if (cx == 1) {
str1="<a title=點擊圖片查看大圖 target='_blank' href='"+f+"'>"
}
if (cx == 2) {
str1="<a title=點擊圖片查看大圖 target='_blank' href='"+a+"'>"
}
str1=str1+"<IMG SRC='"+a+"' alt='"+c+"' STYLE='border-left-color: "+e+"; border-bottom-color: "+e+"; border-top-color: "+e+"; border-right-color: "+e+"; "+g+";' BORDER="+d+" ALIGN='"+h+"' "
if (i == "") {}else{
str1=str1+" WIDTH="+i+" "
}
if (j == "") {}else{
str1=str1+" HEIGHT="+j+" "
}
str1=str1+"></A>"
Form.PicUrl.value =""+f+"|"+FormUrlxx+"";
range.pasteHTML(str1);
}
}else
message.focus();
}
function Wmv(cx){
if (!validateMode()) return;
if (cx == 1) {
var arr = showModalDialog("Inc/Media.asp?Action=a", "", "dialogWidth:390Px; dialogHeight:209Px; status:0;scroll:no;help:0");
}
if (cx == 2) {
var arr = showModalDialog("Inc/Media.asp?Action=b", "", "dialogWidth:390Px; dialogHeight:186Px; status:0;scroll:no;help:0");
}
message.focus();
var range =message.document.selection.createRange();
var FormUrlxx =document.Form.PicUrl.value;
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
f=ss[3];
var str1;
if (a == "") {}else{
str1="<embed src='"+a+"' WIDTH="+b+" HEIGHT="+c+" TYPE='audio/x-pn-realaudio-plugin' autostart='true' controls='IMAGEWINDOW,ControlPanel,StatusBar' console='Clip1'></embed>"
Form.PicUrl.value =""+f+"|"+FormUrlxx+"";
range.pasteHTML(str1);
}
}else
message.focus();
}
function Hr(){
if (!validateMode()) return;
var arr = showModalDialog("Inc/Hr.asp", "", "dialogWidth:390Px; dialogHeight:209Px; status:0;scroll:no;help:0");
message.focus();
var range =message.document.selection.createRange();
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];
var str1;
str1="<hr"
str1=str1+" color='"+a+"'"
str1=str1+" size="+b+"'"
str1=str1+" "+c+""
str1=str1+" ALIGN="+d+""
str1=str1+" WIDTH="+e+""+f+""
str1=str1+">"
range.pasteHTML(str1);
}else
message.focus();
}
function Real(cx){
if (!validateMode()) return;
if (cx == 1) {
var arr = showModalDialog("Inc/Real.asp?Action=a", "", "dialogWidth:390Px; dialogHeight:258Px; status:0;scroll:no;help:0");
}
if (cx == 2) {
var arr = showModalDialog("Inc/Real.asp?Action=b", "", "dialogWidth:390Px; dialogHeight:235Px; status:0;scroll:no;help:0");
}
message.focus();
var range =message.document.selection.createRange();
var FormUrlxx =document.Form.PicUrl.value;
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];
h=ss[6];
i=ss[7];
var str1;
if (a == "") {}else{
if (h=="1"){
str1="<p ALIGN="+d+"><object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' WIDTH="+e+" HEIGHT="+i+"><param NAME='CONTROLS' VALUE='ImageWindow'><param NAME=src VALUE="+a+"><param NAME='CONSOLE' VALUE='Clip1'><param NAME='AUTOSTART' VALUE="+b+"><param NAME='LOOP' VALUE="+c+"></object><br><object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' WIDTH="+e+" HEIGHT=60><param NAME='CONTROLS' VALUE='ControlPanel,StatusBar'><param NAME='CONSOLE' VALUE='Clip1'></object></p>"
}else{
str1="<p ALIGN="+d+"><object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' WIDTH="+e+" HEIGHT=60><param NAME=src VALUE="+a+"><param NAME='CONTROLS' VALUE='ControlPanel,StatusBar'><param NAME='CONSOLE' VALUE='Clip1'><param NAME='AUTOSTART' VALUE="+b+"><param NAME='LOOP' VALUE="+c+"></object></p>"
}
Form.PicUrl.value =""+f+"|"+FormUrlxx+"";
range.pasteHTML(str1);
}
}else
message.focus();
}
function Iframe(){
if (!validateMode()) return;
var arr = showModalDialog("Inc/Iframe.asp", "", "dialogWidth:390Px; dialogHeight:200Px; status:0;scroll:no;help:0");
message.focus();
var range =message.document.selection.createRange();
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
e=ss[4];
x=ss[5];
y=ss[6];
var str1;
str1="<iframe WIDTH="+x+" HEIGHT="+y+" src='"+a+"'"
str1+=" scrolling="+b+""
str1+=" frameborder="+c+""
if(d!='')str1+=" marginheight="+d
if(e!='')str1+=" marginwidth="+e
str1=str1+"></iframe>"
range.pasteHTML(str1);
}else
message.focus();
}
function Help()
{
var helpmess;
helpmess="------------------------ 幫助系統 ------------------------\r\n\r\n"+
"1.請不要發表有危險性的腳本。\r\n\r\n"+
"2.需要你自己運行,才能看效果.\r\n\r\n"+
"3.請不要在這兒書寫js腳本.\r\n\r\n"+
"4.本系統支持任意貼圖,在網上復制圖像,直接粘貼。\r\n\r\n"+
"5.文檔中,系統會自動幫您轉換成為正常路徑。";
alert(helpmess);
}
function Calculator(){
if (!validateMode()) return;
var arr = showModalDialog("Inc/Calculator.asp", "", "dialogWidth:190Px; dialogHeight:240Px; status:0;scroll:no;help:0");
message.focus();
var range =message.document.selection.createRange();
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
var str1;
str1=""+a+""
range.pasteHTML(str1);
}else
message.focus();
}
function ForTable(){
if (!validateMode()) return;
var arr = showModalDialog("Inc/Table.asp", "", "dialogWidth:390Px; dialogHeight:355Px; status:0;scroll:no;help:0");
message.focus();
var range =message.document.selection.createRange();
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];
u=ss[8];
v=ss[9];
w=ss[10];
x=ss[11];
var str1;
str1="<TABLE WIDTH="+u+""+v+" HEIGHT="+w+""+x+" BORDER="+d+" cellpadding="+e+" CELLSPACING="+f+" STYLE='border-collapse:collapse'";
if(g!=''){
str1=str1+" bordercolor="+g+"";
}
if(h!=''){
str1=str1+" bgcolor="+h+"";
}
str1=str1+" ALIGN="+c+">";
for(i=1;i<=a;i++){
str1=str1+"<TR>";
for(j=1;j<=b;j++){
str1=str1+"<TD WIDTH="+100/a+"%></TD>";
}
str1=str1+"</TR>";
}
str1=str1+"</TABLE>";
range.pasteHTML(str1);
}else
message.focus();
}
function Swf(cx){
if (!validateMode()) return;
if (cx == 1) {
var arr = showModalDialog("Inc/Flash.asp?Action=a", "", "dialogWidth:390Px; dialogHeight:258Px; status:0;scroll:no;help:0");
}
if (cx == 2) {
var arr = showModalDialog("Inc/Flash.asp?Action=b", "", "dialogWidth:390Px; dialogHeight:235Px; status:0;scroll:no;help:0");
}
message.focus();
var range =message.document.selection.createRange();
var FormUrlxx =document.Form.PicUrl.value;
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];
j=ss[7];
var str1;
if (a == "") {}else{
str1="<TABLE ALIGN="+g+" BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><object WIDTH='"+j+"' HEIGHT='"+e+"' 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></TD></TR></TABLE>"
Form.PicUrl.value =""+f+"|"+FormUrlxx+"";
range.pasteHTML(str1);
}
}else
message.focus();
}
function ResetForm(){
if (window.confirm('確認要清空對話框內容?')){
frames.message.document.body.innerHTML = '';
return true;
}
return false;
}
function validateMode()
{
if (SourceMode) return true;
alert("在代碼模式下不能進行編輯,請點擊編輯器下方按鈕轉換到設計模式!");
HtmlEdit.focus();
return false;
}
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode==1) {
document.getElementById("setMode0").src="Images/Design/bgdeign.gif"
document.getElementById("setMode1").src="Images/Design/bghtml.gif"
if (SourceMode) {
cleanHtml();
cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
}
EditMode=true;
SourceMode=false;
}
else if (bTextMode==0) {
document.getElementById("setMode0").src="Images/Design/bghtml.gif"
document.getElementById("setMode1").src="Images/Design/bgdeign.gif"
if (EditMode) {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
EditMode=false;
SourceMode=true;
}
message.focus();
}
function checkdata(){
if (SourceMode) return true;
{
alert("在代碼模式下不能保存,請點擊編輯器下方按鈕轉換到設計模式再重復操作一次!")
return false;
}
}
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -