1<div id = "div1" style="display:block"><img src="1.jpg" /></div>
2
3<div id = "div2" style="display:none"><img src="2.jpg" /></div>
4
5<button type="submit" onclick = "replace()">change content</button>
6
7
8<script type = "text/javascript">
9function replace() {
10document.getElementById("div1").style.display="none";
11document.getElementById("div2").style.display="block";
12}
13
14</script>
15