UpTest > Web Development Internet Programming > DHTML Test

Test: DHTML Test

Question 9: Prev Next
You have defined an image tag as follows:

<img id="ERImage" width="100" height="100" onmouseover="ImageChange()" src="Image1.jpg">

How would you implement ImageChange() function, if the new image to be set for mouseover is Image2.jpg?
document.getElementById('ERImage').src="Image1.jpg"
document.getElementById('ERImage').src="Image2.jpg"
document.getElementById('ERImage').style.src="Image1.jpg"
document.getElementById('ERImage').style.src="Image2.jpg"
Please login to submit your answer.