代码如下:this.Response.Write("<script language=JavaScript>");
this.Response.Write("var str;");
this.Response.Write("str=document.edit.txtbox1.value;");
this.Response.Write("str=str+'<img src=UploadImg/"+newfilename + expandName+">';");
this.Response.Write("document.edit.txtbox1.value=str;");
this.Response.Write("</script>");
请问怎么样实现?

解决方案 »

  1.   

    edit是什么?FOrm的name么?
    你把HTML贴出来看看
      

  2.   

    <FORM id="edit" method="post" runat="server">
    <OBJECT id="txtbox" type="text/x-scriptlet" height="360" width="690" data="editor/editor.html" name="doc_html" VIEWASTEXT></OBJECT>在一个aspx文件中嵌套了一个文本编辑器,当单击上传按钮时在编辑其中追加图片url
      

  3.   

    是把指定的RUL地址显示在txtbox中吗?
      

  4.   

    回楼上:不是
    this.Response.Write("<script language=JavaScript>");
    this.Response.Write("var str;");
    this.Response.Write("str=document.edit.txtbox1.value;");
    //获取当前txtbox1的值,赋给变量str
    this.Response.Write("str=str+'<img src=UploadImg/"+newfilename + expandName+">';");
    //把上传图片得到的img url追加到文本里
    this.Response.Write("document.edit.txtbox1.value=str;");
    //重新给文本赋值
    this.Response.Write("</script>");不知道这样表达清楚了吗?