![]() |
#2
aspic2009-10-14 14:42
|

function InsertImg()
{
if (! validateMode()) return;
HtmlEdit.focus();
var range = HtmlEdit.document.selection.createRange();
var arr = showModalDialog("image.asp", "", "dialogWidth:430px; dialogHeight:160px; status:0");
if (arr != null)
{
range.pasteHTML(arr);
//parent.myform.IncludePic.checked=true;
}
HtmlEdit.focus();
}
其中arr为<img src="../../files/big/0924561.jpg">{
if (! validateMode()) return;
HtmlEdit.focus();
var range = HtmlEdit.document.selection.createRange();
var arr = showModalDialog("image.asp", "", "dialogWidth:430px; dialogHeight:160px; status:0");
if (arr != null)
{
range.pasteHTML(arr);
//parent.myform.IncludePic.checked=true;
}
HtmlEdit.focus();
}
为什么插入到编辑器后变成了<img src="http://192.168.1.21/files/big/0924561.jpg">绝对路径
有没有办法插入后还是原来的相对路径呢?
请高手帮忙解决,等待中……—