87,991
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
$(function () {
$('#Button1').click(function () {
$('#testimg').attr({ src: "images/1.jpg", alt: "Test Image" });
})
$('#Button2').click(function () {
$('#testimg').attr({ src: "images/2.jpg", alt: "Test Image" });
})
})
</script>
<input id="Button1" type="button" value="button1" />
<input id="Button2" type="button" value="button2" />
<img id="testimg" alt="test" />