Code : Tout sélectionner
<tr onclick="location='xxx.htm'">
Code : Tout sélectionner
<tr onmouseover="javascript:this.style.background='#efefef" onmouseout="javascript:this.style.background='#F7F7F7'" bgcolor="#F7F7F7" onclick="location='xxx.htm'" style="cursor:pointer">
Code : Tout sélectionner
<style>
tr:hover, tr.over {
background-color: #ffccff;
cursor:pointer;
}
</style>Code : Tout sélectionner
<table>
<tr onmouseover="this.className = 'over';" onmouseout="this.className = this.className.replace('over', '');">
<td>toto</td>
</tr>
</table>
Bonjour ?? merci ??et comment faire pour que le lien qu'il y a dans la cellule change de couleur en même temps qu'on met le pointeur dans la cellule SANS pointer sur le texte lien ...![]()
//...
<tr>
<td><a href="vers/une/page.html" title="titre du lien">toto</a></td>
</tr>
//...
Avec un style CSS, tu peux faire la chose suivante:
Code : Tout sélectionner
td a {
display: block;
}<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" xml:lang="fr" />
<title>Effets de survol sur des cellules de tableau HTML</title>
<meta http-equiv="Content-language" content="FR-fr" xml:lang="fr" dir="ltr" />
<style type="text/css">
/* <![CDATA[ */
table {
border-collapse: collapse;
}
td {
padding: 0;
height: 24px;
border: 1px solid #c00;
color: #000;
background-color: #ff0;
width: 250px;
}
td a {
line-height: 24px;
margin: 0;
display: block;
color: #339;
background-color: #ccc;
}
td a:hover {
color: #fff;
background-color: #933;
}
/* ]]> */
</style>
</head>
<body>
<table summary="">
<tr>
<td>Pour voir la page de toto</td>
<td><a href="#" title=""> toto </a></td>
</tr>
<tr>
<td>Pour voir la page de titi</td>
<td><a href="#" title=""> titi </a></td>
</tr>
<tr>
<td>Pour voir la page de zaza</td>
<td><a href="#" title=""> zaza </a></td>
</tr>
</table>
</body>
</html>
Code : Tout sélectionner
td.lientd a{
propriété: valeur;
}