CodeWidgets.com Online Source Code Library -ASP, ASP.NET, VB, VB.Net, Microsoft® Access, Javascript, VBScript, Website Design, Web Applications, Custom Programming Services Available.

 CodeWidgets.com ASP, ASP.NET, VB, VB.Net,
Microsoft® Access, Javascript, VBScript,
Website Design, Web Applications
Shopping Cart (0) Items $0.00      
 CodeWidgets.com
CodeWidgets.com

 

Website Stats to Date

Pages Viewed 4,401,732
Visitors 1,206,536
Widgets Viewed 3,009,755
Since January 1/2003
 
 
Active Users: 11
 

 
PayPal: Secure online payments!
 
Widget #CS0096

Mouse Roll-Over Effects (Javascript)

Mouse Roll-Over Effects (Javascript)

Send Link

Questions

Currency Conv.
  Widget Info  
How to change the font and background color of a page element when the mouse passes over it, using the onMouseOver and onMouseOut events.

Move Mouse here for Demo

<script language="javascript">
function Swap(Cell){
switch (Cell.style.color){
case "":
{
Cell.style.color="yellow"
Cell.style.background="red"
}
break
case "yellow":
{
Cell.style.color=""
Cell.style.background="none"
}
break
default:
Cell.style.display = "none"
}
}
</script>
<!--the id is required to create and enable the DHTML element-->
<span id="C1" onMouseOver="Swap(this)" onMouseOut="Swap(this)"><font face="Arial" style="cursor:hand"><b>Mouse Roll-Over Test Area</b></font></span>
<!--Cell.style.color Sets the font color-->
<!--Cell.style.background sets the background color-->
<!--style="cursor:hand" changes the cursor to the Hand icon-->
 Licensing
Format: Plug & Play Code
Copy the Source Code Above..
Licencing Terms: No Restrictions
Re-Distribution Permitted
This source code is provided to you "as is" without warranty
CLICK HERE FOR TERMS OF USE
Copyright 2002-2006 Comrie Software Solutions
 Related Widgets

Add MouseOver and OnClick events to a Datagrid (ASP.NET)
Add Sounds to button events. ASP.NET
Alternate colors on grid rows (ASP)
Dynamic Drop Down Web Menu
Dynamically change page content using mouse over events (Javascript)
Email Cloaking - Spam Prevention
Tabbed Product Display (HTML)

ShoppingCart Empty
Services Contact Info Legal Info
Designated trademarks and brand names are the property of their respective owners.

By accessing this website it is assumed that you agree to the TERMS OF USE.

Send questions or comments regarding this website to  Comrie Software Solutions.

Click here for a complete list of available Widgets.