Javascript ET css

Fermé
zdoobz Messages postés 33 Date d'inscription dimanche 6 février 2005 Statut Membre Dernière intervention 26 novembre 2009 - 31 mai 2005 à 12:27
mamiemando Messages postés 33081 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 27 avril 2024 - 31 mai 2005 à 14:39
Bonjour,
voilà, venons en au faite, je ne sais pas comment
grace au JS, je peux changé un class prédéfini en css.
ex:
<head>
<style>
.tit {font-weight:bold;text-align:center; border:1px solid black;}
.tit td{font-size: 12px; font-family: Verdana; border:1px solid black; }
.lkn td{background-color: #f3f3f3; font-size: 12px;font-weight:lighter;text-align:left;font-family: Verdana;}
.lko td{background-color: #ffffff; font-size: 12px;font-weight:lighter;text-align:left;font-family: Verdana;}

</style>
</head>

<body>
<table width="120px" style="border:1px solid black;" bgcolor="#f3f3f3">
<tr>
<td>
<table align="center" bgcolor="#DFE8F1" width="110px">
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" width="100px" class="lol" onMouseOver="javascript:lkn.class='lko'">
<tr class="tit">
<td>TITRE</td>
</tr>
<tr class="lkn">
<td>lien</td>
</tr>
<tr class="lkn">
<td>lien</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
Dans cette exemple je ne sais pas comme lorsque l'évènement On MouseOver se réalise, la class "lkn" se change en "lko"
Merci

2 réponses

en clair,c ko ita question ?
0
mamiemando Messages postés 33081 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 27 avril 2024 7 749
31 mai 2005 à 14:39
Comme il n'y a pas de question je peux juste te dire : Ca intervient là :
onMouseOver="javascript:lkn.class='lko'
Voilà Voilà plom plom plom :)
0