1. Home
  2. Computing & Technology
  3. Personal Web Pages

Mouseover Code
Make Your Graphics Change

From , former About.com Guide

Start copying this template below. You may have to copy and paste the code in two sections if there is a commercial in the way. You don't want to copy and paste the commercial and the code around it. Then paste the HTML code in your HTML editor.

About this Template

See What This Page Looks Like

Put This Code In The HEAD of Your Page. Start copying here:

<script language="JavaScript">
//
// Rollover
//
function Hilite(name,over)
{
if(window.document.images)
{
if (over)
window.document.images[name].src = "graphics/" + name + "_ov.jpg";
else
window.document.images[name].src = "graphics/" + name + ".jpg";
}
}
</script>
-------------------------------------------------------------------------------

Put This Part In the BODY of Your Page. Start copying this part here:

<img name="about" src="graphics/about.jpg" border="0" onMouseOver="Hilite('about',true)" onMouseOut="Hilite('about',false)">

Explore Personal Web Pages
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Personal Web Pages
  4. Templates, Scripts, Hacks
  5. Scripts: Free Copy & Paste
  6. Mouseover Code - Copy and Paste>

©2009 About.com, a part of The New York Times Company.

All rights reserved.