如何在ASP.NET中做那种按一个按钮就会刷新这个网页中的某一张图片,而不是整个网页刷新
展开全部
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">
// <![CDATA[
function Button1_onclick() {
document.getElementById("img1").src = "http://news.baidu.com/z/resource/r/image/2011-07-28/58ec468c2ab4dff0469f54aad68ee87f.jpg";
}
// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<img id="img1" src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif" />
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
</div>
</form>
</body>
</html>
<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">
// <![CDATA[
function Button1_onclick() {
document.getElementById("img1").src = "http://news.baidu.com/z/resource/r/image/2011-07-28/58ec468c2ab4dff0469f54aad68ee87f.jpg";
}
// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<img id="img1" src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif" />
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
</div>
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询