藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

請教高手~這裡的圖片路徑是什麼?

請教高手~這裡的圖片路徑是什麼?

http://1k7.com/00/webedit/index.htm

那些小按扭圖標的路徑

頂下

什麼時間有高手呀?

[code]  <form method=post name=form1 onsubmit="document.form1.message.value=EditCtrl.document.body.innerHTML; return checkReply();" onReset="mr()">
<script language="JavaScript1.2">
var css1 = ("<html>\n"+
"<head><!--2004-3-4-->\n"+
"<style TYPE=\"text/css\">\n"+
"A:link { text-decoration: none; color: #336699 }\n"+
"A:visited { text-decoration: none; color: #666666 }\n"+
"A:hover { text-decoration: underline; color: #666666 }\n"+
"A:active { text-decoration: none; color: #336699 }\n"+
"BODY   { font-size: 9pt; color: #000000 }\n"+
"TABLE  { font-size: 9pt; color: #000000 }\n"+
"TD     { font-size: 9pt; color: #000000 }\n"+
"FORM   { font-size: 9pt }\n"+
"OPTION { font-size: 9pt }\n"+
"P      { font-size: 9pt }\n"+
"BR     { font-size: 9pt }\n"+
".tds { line-height: 120% }\n"+
"div{RIGHT: 0px; POSITION: relative; TOP: 0px}\n"+
".Hdiv{RIGHT: 6px; width: 120px; VISIBILITY: hidden; POSITION: absolute; TOP: 12px;}\n"+
".ForumTitle :link { FONT-SIZE: 12pt }\n"+
".ForumTitle :visited { FONT-SIZE: 12pt }\n"+
".ForumTitle :hover { FONT-SIZE: 12pt }\n"+
".ForumTitle :active { FONT-SIZE: 12pt }\n"+
".hand { cursor:hand }\n"+
".lm { font-family: Webdings; font-size: 16px; color: #9EBBDA; cursor: hand }\n"+
".lmn { font-size: 9pt; color: #000000; cursor: hand }\n"+
".lifont { font-family: Wingdings; font-size: 9px; color: #000000 }\n"+
"</style>\n"+
"<head><!--2004-3-4-->\n"+
"<body leftmargin=\"1\" topmargin=\"1\" marginwidth=\"1\" marginheight=\"1\" bgcolor=\"#FFFFFF\">\n");
var css2 = ("</body>\n"+
"</html>");
function mr () {
var msg = document.form1.message.value;
EditCtrl.document.body.innerHTML = msg;
}function selectRange(){
edit = EditCtrl.document.selection.createRange();
RangeType =  EditCtrl.document.selection.type;
}function format (what,opt) {
EditCtrl.focus ();
selectRange ();
if (what == "newmsg" && confirm ("確定要新建文檔嗎?")) {
mr ();
} else if (what == "saveas") {
var winSaveTitle = document.form1.title.value;
if (winSaveTitle == "") {
winSaveTitle = "No Title";
}var winSave = window.open();
winSave.document.open ("text/html","gb2312");
winSave.document.write (css1);
winSave.document.write (EditCtrl.document.body.innerHTML);
winSave.document.write (css2);
winSave.document.close ();
winSave.document.execCommand ("SaveAs","",winSaveTitle);
winSave.close ();
} else if (what == "table") {
var tablevar = showModalDialog ("http://1k7.com/00/webedit/table.htm", "", "dialogWidth:23.6em; dialogHeight:11.3em; status:0");
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+"\" 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></td>";
}string = string+"</tr>";
}string = string+"</table>";
edit.pasteHTML (string);
}} else if (what == "small" || what == "big") {
var strHTML;
if (RangeType == "Text"){
edittxt = "<" + what + ">" + edit.text + "</" + what + ">";
edit.pasteHTML (edittxt);
}} else if (what == "pic") {
if (RangeType == "Control") {
EditCtrl.document.execCommand("InsertImage",true);
} else {
var picvar = showModalDialog ("http://1k7.com/00/webedit/picdialog.htm", "", "dialogWidth:30em; dialogHeight:13em; status:0");
if (picvar != null) {
picvar = picvar.split("*");
var src_v = picvar[0];
if (src_v != "" && src_v != "http:\/\/") {
var alt_v = picvar[1];
var arrange_v = picvar[3];
var border_v = picvar[4];
if (border_v == "") {
border_v = "0";
}var image = "<img src=\""+src_v+"\" alt=\""+alt_v+"\" border=\""+border_v+"\" align=\""+arrange_v+"\">";
var link_v = picvar[2];
if (link_v != "" && link_v != "http:\/\/") {
image = "<a href=\""+link_v+"\" target=\"_blank\">"+image+"</a>";
}edit.pasteHTML (image);
}}}} else if (what == "link") {
EditCtrl.document.execCommand("CreateLink",true);
} else if (opt == "") {
if (what == "ForeColor") {
opt = prompt("hy_lan_04025","");
} else if (what == "FontName") {
opt = prompt("hy_lan_04024","");
} else {
EditCtrl.document.execCommand (what);
}}if (opt != "" && opt != null && what != "saveas") {
EditCtrl.document.execCommand (what,"",opt);
}EditCtrl.focus ();
}function initEditor () {
EditCtrl.document.designMode="On";
EditCtrl.document.open();
EditCtrl.document.write(css1);
EditCtrl.document.write(css2);
EditCtrl.document.close();
mr ();
}</SCRIPT>
      <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr><td bgcolor="#CCCCCC" width="300">
<table border="0" cellspacing="1" cellpadding="0"><tr><td>
<script>
var buttons = new Array (8,23,23,4,23,23,23,23,4,23,23,4,23,23,23,25,8,23,23,23,4,23,23,4,23,23,23,4,23,23,23,25);
var action = new Array ("","newmsg","saveas","","Delete","Cut","Copy","Paste","","Undo","Redo","","insertHorizontalRule","table","pic","link","","bold","italic","underline","","small","big","","justifyleft","justifycenter","justifyright","","insertorderedlist","insertunorderedlist","outdent","indent");
var tooltip = new Array ("","新建","保存","","刪除","剪切","複製","粘貼","","撤銷鍵入","恢復鍵入","","直線","插入表格","插入圖片","插入超級鏈接","","加粗","傾斜","下劃線","","減小字號","增大字號","","左對齊","居中","右對齊","","編號","項目符號","減少縮進量","增加縮進量");
var left = 0, s = "";
for (var i=0; i<buttons.length; i++) {
s += "<span oncontextmenu=\"return(false)\" ondragstart=\"return false\" style=\"width: " + buttons[i] + "; position: relative; height: 26\">\n";
s += "<span style=\"width: " + (buttons[i]) + "; clip:rect(0 "+buttons[i]+" 26 "+0+"); position: absolute; margin: 0px; padding: 0; height: 26; top: 0; left: 0; overflow: hidden\">\n";
s += "<img border=\"0\" src=\"toolbar.gif\" style=\"position:absolute; top:0; left:-" + left + "\" width=\"596\" height=\"52\"";
if (buttons[i] != 4 && buttons[i] != 8) {
s += " onMouseOver=\"this.style.top=-26\" onMouseOut=\"this.style.top=0\" onClick=\"";
if (action[i] != "createLink") {
s += "format('" + action[i] + "',''); this.style.top = 0\" ";
} else {
s += "createLink(); this.style.top = 0\" ";
}s += "TITLE=\"" + tooltip[i] + "\"";
}s+="></span></span>";
left+=buttons[i];
}document.write (s);
</script>
</td></tr></table></td><td valign="top" bgcolor="#CCCCCC">
<table border="0" cellspacing="2" cellpadding="0" style="height: 27px"><tr><td>
<select onChange="format ('FormatBlock',this[this.selectedIndex].value); this.selectedIndex=0" style="width: 100px">
<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;">標題六</select>
<select onChange="format ('ForeColor',this[this.selectedIndex].style.color); this.selectedIndex=0" style="width: 100px">
<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>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
<select onChange="format('FontName',this[this.selectedIndex].value); this.selectedIndex=0" style="width: 100px">
<OPTION selected>字體
<OPTION value="geneva,arial,sans-serif">Arial
<OPTION value="courier, monospace">Courier
<OPTION value="Fixedsys">Fixedsys
<OPTION value="Tahoma">Tahoma
<OPTION value="times,serif">Times
<OPTION value="verdana,geneva,arial,sans-serif">Verdana
<OPTION value="Webdings">Webdings
<OPTION value="Wingdings">Wingdings
<OPTION value="標楷體">楷體
<OPTION value="細明體">細明體
<OPTION value="仿宋_GB2312">仿宋
<OPTION value="黑體">黑體
<OPTION value="隸書">隸書
<OPTION>自定義...</OPTION></select>
<SELECT class="select" onchange="format('fontSize',this[this.selectedIndex].text);this.selectedIndex=0" style="width: 100px">
<OPTION selected>字號<OPTION>1<OPTION>2<OPTION>3<OPTION>4<OPTION>5<OPTION>6<OPTION>7</OPTION>
</SELECT></td></tr></table></td></tr></table>
      <div align="center"></div>
      <div align="center"></div>
      <table border="0" cellspacing="0" cellpadding="0" align="center">
        <tr><td colspan="2">
<iframe name="EditCtrl" style="height: 480; width: 760" tabindex=4></iframe>
<input type=hidden name=message value=""></td></tr></table>
      <div align="center">
        <script language="JavaScript1.2">
initEditor();
</script>
</div>
    </td>
</tr>
</form>

[/code]

已經解決

http://im286.com/viewthread.php?tid=443709&pid=5410347&page=1#pid5410347




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com