Home Links and buttons Rollover background-color button Developer's View
<html>
<head>
<style type="text/css">
.initial2{font-weight:bold;background-color:lime}
</style>
<script type="text/javascript">
<!--
/***********************************************
* Rollover background-color button Script- (c) Dynamic Drive
(www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify optional button target: "_new" for new window, or name of FRAME target
(ie "myframe")
var buttontarget=""
function change(e, color){
var el=window.event? event.srcElement: e.target
if (el.tagName=="INPUT"&&el.type=="button")
el.style.backgroundColor=color
}
function jumpto2(url){
if (buttontarget=="")
window.location=url
else if (buttontarget=="_new")
window.open(url)
else
parent[buttontarget].location=url
}
//-->
</script>
</head>
<body>
<form onMouseover="change(event, 'yellow')" onMouseout="change(event, 'lime')">
<input type="button" value="Yahoo" class="initial2" onClick="jumpto2('http://yahoo.com')">
<input type="button" value="Google" class="initial2" onClick="jumpto2('http://google.com')">
<input type="button" value="AlltheWeb" class="initial2" onClick="jumpto2('http://alltheweb.com')">
</form>
</body>
</html>