ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
5917
5917
EMPFEHLEN
-
05.08.03 15:10 #1
- Registriert seit
- Apr 2002
- Ort
- Ingolstadt
- Beiträge
- 2.940
Wie kann ich Tabellenzellen bei Mouseover highlighten?
Einzelne Zellen:
Einzelne Zeilen:PHP-Code:<table width="200" border="1" cellpadding="1" cellspacing="0">
<tr>
<td onMouseover="this.bgColor='beige'" onMouseout="this.bgColor='white'"> </td>
<td onMouseover="this.bgColor='beige'" onMouseout="this.bgColor='white'"> </td>
<td onMouseover="this.bgColor='beige'" onMouseout="this.bgColor='white'"> </td>
</tr>
<tr>
<td onMouseOver="this.bgColor='beige'" onMouseOut="this.bgColor='white'"> </td>
<td onMouseOver="this.bgColor='beige'" onMouseOut="this.bgColor='white'"> </td>
<td onMouseOver="this.bgColor='beige'" onMouseOut="this.bgColor='white'"> </td>
</tr>
</table>
Wenn man nicht alle Zellen einzeln zuweisen will, kann man das auch via Skript erreichen:PHP-Code:<table width="200" border="1" cellpadding="1" cellspacing="0">
<tr onMouseOver="this.bgColor='beige'" onMouseOut="this.bgColor='white'">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr onMouseOver="this.bgColor='beige'" onMouseOut="this.bgColor='white'">
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
PHP-Code:<script type="text/javascript">
function highlight(){
var td = document.getElementsByTagName('td');
var x = td.length;
for(i=0;i<x;i++){
td[i].onmouseover = new Function("this.bgColor='beige';");
td[i].onmouseout = new Function("this.bgColor='white';");
}
}
</script>
Ähnliche Themen
-
XML Auslese bei mouseover highlighten. Wie?
Von Santiago im Forum Flash PlattformAntworten: 1Letzter Beitrag: 27.01.05, 19:48 -
dynamisch highlighten
Von mo-ca im Forum Javascript & AjaxAntworten: 1Letzter Beitrag: 26.04.04, 20:11 -
PHP highlighten mit bbcode
Von Wini im Forum PHPAntworten: 4Letzter Beitrag: 05.01.04, 20:59 -
Datei so exportieren, das man Film "bedienen" kann? Mouseover?
Von daDom im Forum Cinema 4DAntworten: 6Letzter Beitrag: 07.10.03, 15:57 -
problem mit highlighten
Von DarkSummer im Forum PHPAntworten: 6Letzter Beitrag: 16.03.03, 09:08





Login





