»
EnglishFrenchVietnamese

Print - Lighting background menu - JavaScriptBank.com

Full version: jsB@nk » Menu » Lighting background menu
URL: https://www.javascriptbank.com/lighting-background-menu.html

Lighting background menu © JavaScriptBank.comThe code will change color bakcground of item when visitors move mouse over it.

Full version: jsB@nk » Menu » Lighting background menu
URL: https://www.javascriptbank.com/lighting-background-menu.html



CSS
<STYLE>#menu {BORDER-RIGHT: azure 4px outset; BORDER-TOP: azure 4px outset; VISIBILITY: hidden; BORDER-LEFT: azure 4px outset; WIDTH: 300px; CURSOR: default; LINE-HEIGHT: 20px; BORDER-BOTTOM: azure 4px outset; FONT-FAMILY: Helvetica, Arial, Verdana; BACKGROUND-COLOR: steelblue}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript>// This script will work only with IEvar name = navigator.appName;if (name != "Microsoft Internet Explorer"){window.alert("Only work in IE");return;}</SCRIPT><SCRIPT language=JavaScript1.2>// Prince's Palace // mail your feedback [email protected]// Set this variable to 1 if you wish the URLs of the menu items displayed in the status barvar display_url=1// Show menufunction showmenu(){menu.style.visibility="visible"}// Highlight menu - you can use your favorite colors function highlight(){if (event.srcElement.className=="menu"){event.srcElement.style.backgroundColor="crimson"event.srcElement.style.color="aliceblue"if (display_url==1)window.status=event.srcElement.url}}function lightout(){if (event.srcElement.className=="menu"){event.srcElement.style.backgroundColor=""event.srcElement.style.color="white"window.status=''}}function jumpto(){if (event.srcElement.className=="menu")window.location=event.srcElement.url}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=showmenu()><DIV id=menu onmouseover=highlight() onclick=jumpto() onmouseout=lightout()><DIV class=menu url="http://JavaScriptBank.com">Link 1 </DIV><DIV class=menu url="http://JavaScriptBank.com">Link 2</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 3</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 4</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 5</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 6</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 7</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 8</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 9</DIV><DIV class=menu url="http://JavaScriptBank.com">Link 0</DIV><HR></DIV></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->