<IMG alt="趋势图" id ="img1" src="lhqs.aspx?type=bar&amp;width=700&amp;height=450&amp;title=来活月趋势图&amp;"><input type=text id="tex1"><button onclick= "changesrc()">btbt</button>
function changesrc()
{
  document.all("img1").src=document.all("tex1").value;
}

解决方案 »

  1.   

    客户端改变
    <img id='img1' alt="趋.....
    <input  type='button' onclick='document.all.img1.src="lhqs.aspx?type=bar&amp;width=400&amp;height=300&amp;title=入库月趋势图&amp"'>服务器端
    <img id='img1' runat='server' ....private button1_click(object sender ....{
       img1.src="xxxxxxx";
    }
      

  2.   

    <IMG alt="趋势图" src="<%= strUrl %>">
    在后台声明
    public string strUrl;
    在btnUpdate为strUrl赋值
      

  3.   

    <IMG alt="趋势图" src="lhqs.aspx?type=bar&amp;width=700&amp;height=450&amp;title=来活月趋势图&amp;" id="img1" runat="server">img1.Src="...";
      

  4.   

    就是你要在<IMG〉里加 id="img1" runat="server"
      

  5.   

    在HTML代码中添加:<IMG alt="" src="" id="myimg" runat="server">
    然后在代码(CodeBehind)中
       Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            myimg.Src = MapPath("1.jpg")
        End Sub
      

  6.   

    在代码(CodeBehind)中还要声明一下:
     Protected WithEvents myimg As System.Web.UI.HtmlControls.HtmlImage