Forum Moderators: open
function td_style(itm,bgcol,csstyle)
{
itm.style.backgroundColor = bgcol;
itm.style.cursor = csstyle;
}
:
:
<html>
:
<td class=cattitle bgcolor=yellow id=box1
onmouseover='td_style(gohome,"blue","Hand")'
onmouseout='td_style(gohome,"yellow","Auto")'
onClick='document.location="index.asp"'>
Home
</td>
:
:
:
And you usually have to check for browser to make sure you support both newer and older versions.
For example, all newer browsers support document.getElementById(), while older IE support document.all[] .. and old NS support document.layers()
IE has usually more than 90% of the visitors, with all the other browsers sharing the last 10%. However, the actual numbers depend entirely on page content.
If your page supports IE, Opera, and Mozilla/Gecko browsers (and perhaps NS4 as well) you should be mostly safe, especially if your code conforms to W3C standards.
If you want to read more about JS standards you can look here:
[mozilla.org...]
[devedge.netscape.com...]