![]() Capt. Horatio T.P. Webb | VBScript MouseOvers Parks -- FALL 1999 Last Updated 10:00 AM 4/16/2018 | |
Here is the javascript code:
function swp(mouse_action)
{
switch(mouse_action)
{
case "down":
document.images[3].src="buttondwn.gif";
break;
case "up":
document.images[3].src="buttonup.gif";
break;
case "click":
alert ("You clicked the button!");
break;
}
}
and the code in the HTML for the "live" button:
<a href="#" onMouseOver="swp('down')" onMouseOut="swp('up')" onClick="swp('click')">
<img src="buttonup.gif" border="0"></a>