if (document.getElementById) {
function alterImg() {
document.body.getElementById('sendimg').src="url('images/tridown.png')";
}
}
and then the html:
<div id="sendbutton">
<img id="sendimg" src="images/tri.png" onclick="alterImg()" />
</div>
i tried using a this keyword reference too, to no avail.
A couple of problems here:
Use document.getElementById instead of document.body.getElementById
function alterImg() {
document.getElementById(‘sendimg’).src = “images/tridown.png”;
}