JavaScript Image Rollover effect to change the image onmouseover functionality can be created by using JavaScript DOM methods and onmouseover event of HTML img tag. You can call the JavaScript functions created for changing the image onmouseover and onmouseout. JavaScript object returned by the getElementById method provides the access to "Src" property of the HTML img tag that can changed dynamically.
JavaScript DOM Features Used
1. document object
2. getElementById method
3. Src property
Try the sample below to learn and practice the JavaScript DOM code for developing this functionality: