“http://localhost/gxfy/admin/“如没有特殊有求,这么写就行例(JavaScript):
// 正则表达式对象
var re = new RegExp("“http://localhost/gxfy/admin/“", "");// 文本
var oldtext = "your text";var newtext = oldtext.replace(re, "replace to");

解决方案 »

  1.   

    自己搞定了,谢谢你。
    //编辑器
    var editor=window.parent.document.all["editor"].docsource;
    var temp=document.all["path"].value;
     //alert('现在的隐藏域中的值:'+temp);
    if(editor!=''){
    editor+='<br><img src=../'+temp+'>';
    }
    else{
    editor='<br><img src=../'+temp+'>';
    }  
    var regaa=/“http:\/\/localhost\/gxfy\/admin\//g; 
     
    var aa=editor.replace(regaa,'');var regbb=/“/g;
    var bb=aa.replace(regbb,'');var regcc=/:/g;
    var cc=bb.replace(regcc,":");//alert(cc);
    window.parent.document.all["editor"].docsource=cc;
    window.parent.document.all["content"].value=cc;