CodeWidgets.com: Online Source Code Library: C#, ASP, ASP.NET, VB, VB.NET, VB Script, Microsoft Access, Excel, JavaScript, J Script, XML, VBScript, Website Design, DevExpress Components, Reporting, Application and Website Templates.

Widget #CS0096

Mouse Roll-Over Effects (Javascript)

Free

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-->

Last Updated: 10/9/2019


Related Widgets 
Price 
# 
CS0040 Add Sounds to button events. ASP.NET$0.00Add To Cart
CS0012 Email Cloaking - Spam Prevention$10.00Add To Cart
CS0006 ShoppingCart.NET Class (C#.Net)$10.00Add To Cart

Recently Viewed Widgets 
Price 
# 
No data to display

Collapse/Expand
Format

Plug & Play Code

Copy the Source Code Above..


Collapse/Expand
License

License

No Restrictions

Re-Distribution Permitted
This source code is provided to you "as is" without warranty
CLICK HERE FOR TERMS OF USE
Copyright 2000-2006 Comrie Software Solutions


This website uses Cookies to store User information and Shopping Cart Items for the duration of your visit to CodeWidgets.com.

No Credit Card or Financial information is stored by CodeWidgets.com. Click Here For Our Complete Privacy Policy and Terms of Use.

I Understand