I have a html page in which there is an image in anchor tag code is :
<a href="www.google.com" id="x"><img src="images/test.png" /></a>
on body onload event i am calling a javascript function which dynamically changes the image . My code is:
<script type="text/javascript">
function changeImage()
{
document.getElementById('x').innerHTML= '<img src="images/test2.png" />';
}
</script>
This is working fine in firefox but not working in google chrome and ie. Please help..
<to theimgtag a typo or your actual code looks like this?