Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing an item's class with Javascript 1

Status
Not open for further replies.

Inssider

Technical User
Aug 24, 2000
49
0
0
US
How can I make it so that by hovering the mouse over an item, it changes its class? I call a Javascript function through onmouseover(), but then I want the function to change the item's class. Does anyone know how?
 
hi
ir's simple, but not in ns4 only (in netscrap styles append onload only: you'll have to reload page passing new style name like a parameter & then onload assign it.. ugly-ugly)

take a look:
<div id=&quot;my&quot; class=&quot;cl1&quot; onmouseover=&quot;this.className='cl2'&quot;><div>

or something like that Victor
 
Thank you so much, Victor.

Do you know a site that has a list of the Javascript element hierarchy, particularly in Internet Explorer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top