Sonia
07-25-2003, 01:02 PM
The following is a code to produce a rolloover effect on a link:
document.all.link.style.color= 'red'
But what does 'document.all' means?
document.all.link.style.color= 'red'
But what does 'document.all' means?
|
Click to See Complete Forum and Search --> : rollover effect Sonia 07-25-2003, 01:02 PM The following is a code to produce a rolloover effect on a link: document.all.link.style.color= 'red' But what does 'document.all' means? pyro 07-25-2003, 01:21 PM document.all is the IE4 way to reference an element. The DOM way is document.getElementById(). document.all = IE4 document.layers = NN4 document.getElementById() = DOM So, you'd be better with: document.getElementById("link").style.color= 'red' Or, even better, just use CSS in the first place: <style type="text/css"> .link:hover { color: red; } </style> Sonia 07-25-2003, 01:31 PM What does DOM mean? pyro 07-25-2003, 01:33 PM DOM stands for Document Object Module. More info at http://www.w3c.org/DOM/#what webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |