I've got a fairly lengthy set of onmouseover and onmouseout and onclick JavaScript statements occurring, over and over again, within a bunch of table cells. It would be unbelievably cool if there was a way to move all the JavaScript out to a style sheet. Is there a way to do that? If I could somehow specify that with a class applied, all the JavaScript for that class would apply . . . .
Here's an example from the current project:
=======================================================
<td class="button"
onmouseover="style.backgroundColor='#9ac';
style.color='black';status='Home Page';
style.border='1px solid';style.borderColor='#000 #ccc #ccc #000';"
onmouseout="style.backgroundColor='#336';
style.color='#ccc';status='';
style.border='1px solid';style.borderColor='#ccc #000 #000 #ccc';"
onclick="location.href='index.html';">
Home Page</td>
=======================================================
What would be wonderful is to be able to reduce it to:
<td class="button">Home Page</td>
Any chance this is possible?
Thanks for any help you can offer.
John Herring
jhherring@yahoo.com