codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || RAM 
Search Site:

Changing the background color onMouseOver



This rather neat trick lets you change the background color when the user hovers over a link.

Hover over the links below to see what we are talking about:



The code to do this uses the onMouseOver event to check whether the user is hovering over the link, and the simply sets the document.bgColor to the new color value.

Note that you can also use hexadecimal color codes here with the same effect. Here's the code:

<a href="http//:www.codetoad.com" onMouseOver="document.bgColor='red';return true">Red</a>













Recent Forum Threads
•  Run a program both on windows and linux
•  VERO.SurfCAM.v2014
•  Schlumberger.Petrel.V2013.2
•  Petrel.V2013.2
•  Altair.HyperWorks.v12
•  VoluMill.v6.1
•  VoluMill.NEXION.6
•  VERO.SurfCAM.v2014
•  Schlumberger.Petrel.V2013.2


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2015