Change Picture / Image onmouseOver

This java script function changes the image or picture when you point/focus your mouse cursor on the image.


  • The javascript function will change the image or picture when you focus your mouse cursor on the image.
  • Just copy the code in to your page and use it.


Just point your mouse cursor on the image / picture


<!--Script by>
<!-- more scripts @ -->
<script type="text/javascript">
var picture1 = "";
var picture2 = "";
if (document.images) {
image1 = new Image();
image1.src = picture1
image2 = new Image();
image2.src = picture2;
function mover(img){
document["change"].src = img.src;
function mout(img){
document["change"].src = img.src;
<a href="" onMouseOver="mover(image1)" onMouseOut="mout(image2)">
<img name="change" src="" border=0></a>
<!-- Script by -->

  • Release Date - 02-01-2007
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • To use your own image specify the proper path or name of the image in the javascript code.
  •  var picture1 = "Your Picture1";
    var picture2 = "Your Picture2";
  • Now make the following changes in the html code
  •  <a href="" onMouseOver="mover(image1)" onMouseOut="mout(image2)">
    <img name="change" src="Your Picture2"></a>
  • Just copy the code and use it for free


Related Scripts

Free Javascript Scripts

Ask Questions

Ask Question