HTML5 Canvas Example
HTML
<div id = "stage">
<img src="poe.jpg" style="height: 540px; width: 960px;" id = "picture" onclick="changeImage()" />
</div>
CSS
#stage
{
width: 960px;
height: 540px;
border: 2px solid grey;
margin: auto;
position: relative;
background-color: white;
}
#picture
{
width: 960px;
height: 540px;
margin: auto;
position: relative;
}
JavaScript
function changeImage()
{
if (document.getElementById("picture").src == "poe.jpg")
{
document.getElementById("picture").src == "inventory.jpg"
}
else if (document.getElementById("picture").src == "inventory.jpg")
{
document.getElementById("picture").src == "skilltree.jpg"
}
else
{
document.getElementById("picture").src == "poe.jpg"
}
}