<IMG alt="趋势图" id ="img1" src="lhqs.aspx?type=bar&width=700&height=450&title=来活月趋势图&"><input type=text id="tex1"><button onclick= "changesrc()">btbt</button>
function changesrc()
{
document.all("img1").src=document.all("tex1").value;
}
function changesrc()
{
document.all("img1").src=document.all("tex1").value;
}
<img id='img1' alt="趋.....
<input type='button' onclick='document.all.img1.src="lhqs.aspx?type=bar&width=400&height=300&title=入库月趋势图&"'>服务器端
<img id='img1' runat='server' ....private button1_click(object sender ....{
img1.src="xxxxxxx";
}
在后台声明
public string strUrl;
在btnUpdate为strUrl赋值
然后在代码(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
Protected WithEvents myimg As System.Web.UI.HtmlControls.HtmlImage