<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<script>
function change1()
{
document.getElementById("changing_image").innerHTML='<img src=Desert.jpg>';
}
function change2()
{
document.getElementById("changing_image").innerHTML='<img src=Lighthouse.jpg>';
}
function change3()
{
document.getElementById("changing_image").innerHTML='<img src=Peng%20uins.jpg>';
}
</script>
</head>
<body>
<a onclick="change1()"><button>Image 1</button></a>
<a onclick="change2()"><button>Image 2</button></a>
<a onclick="change3()"><button>Image 3</button></a>
<div id="changing_image"></div>
</body>
</html>
No comments:
Post a Comment