Das ist alles richtig nur der IE wird über 95% genutzt....
So ich habe nun rumgebastelt und wieder viel neues dazu gelernt :)
Nur Frage ich mich wie nun wie ich die Farbe aus den onclick Event auch beim onmouseout event beibehalte?
Geht das auch ohne JavaScript? Ich hätte das gerne ohne JavaScript aber jetzt stehe ich wieder vor meinen Grenzen wo ich nicht weiterkomme...? Ich glaube das geht ohne JavaScript gar nicht?
Mein Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>xxx</title>
<meta http-equiv="Content-Type" content="text/html; ISO-8859-1">
<style type="text/css">
body { color:#000000; background-color:#ffffff; }
a:link { color:#333399; background-color:#ededed; }
a:visited { color:#993333; background-color:#ededed; }
a:focus, a:hover { color:#ffffff; background-color:#000066; }
a:active { color:#ff0000; background-color:#cccccc; }
table, td, th { border:1px solid #000000; }
table { border-spacing:0; border-collapse:collapse; }
td, th { text-align:left; vertical-align:top; padding:0; }
td a { display:block; }
.bg { color:#000000; background-color:#ffff99; }
.click { background-color:#cccccc; cursor:pointer; }
.cursor { cursor:pointer; }
</style>
</head>
<body>
<table>
<thead>
<tr><th>1111</th><th>22222</th><th>33333</th><th>44444</th><th>55555</th></tr>
</thead>
<tbody>
<tr class="bg" onmouseover="this.className='cursor';"
onmouseout="this.className='bg';"
onclick="window.location.href='#'; this.className='click';">
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
</tr>
<tr class="bg" onmouseover="this.className='cursor';"
onmouseout="this.className='bg';"
onclick="window.location.href='#'; this.className='click';">
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
</tr>
</tbody>
</table>
</body>
</html>