Ciao,
ich habe mir auf www.jswelt.de ein Skript geholt, das Tabellenfelder beim drüberrollen die Farbe wechseln lässt.
Skript:
<style type="text/css">
<!--
.Navlink {COLOR: #808080; TEXT-DECORATION: none; font-family: arial; font-size: 10pt; font-weight: bold;}
a:link.Navlink {color : #808080;}
a:visited.Navlink {color : #808080;}
a:active.Navlink {text-decoration: none;}
a:hover.Navlink {text-decoration: none;}
-->
</style>
<script language="javascript"">
<!--
function LmOver(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#FFFFFF";
elem.style.cursor = 'hand'}
function LmOut(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#808080";}
function LmDown(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#FFFFFF";}
function LmUp(path)
{location.href = path;}
-->
</script>
Im Body
<td onMouseover="LmOver(this, '#808080')" onMouseout="LmOut(this, '#FFFFFF')" onMouseDown="LmDown(this, '#808080')" onmouseup="LmUp('#')" bgcolor="#FFFFFF" width="58"><a href="index.htm" class="navlink">Home</a></td>
Mein Problem: Wenn man über das Feld fährt wechselt es schön die Farbe, aber wenn man nicht über dem Text des Links ist, d.h. in einem Leerraum, dann wechselt es nicht zur gewünschten Seite.
Wie kann ich machen, dass das ganze Tabellenfeld als Link gilt?
Bin nicht so JS begabt.
Danke
ich habe mir auf www.jswelt.de ein Skript geholt, das Tabellenfelder beim drüberrollen die Farbe wechseln lässt.
Skript:
<style type="text/css">
<!--
.Navlink {COLOR: #808080; TEXT-DECORATION: none; font-family: arial; font-size: 10pt; font-weight: bold;}
a:link.Navlink {color : #808080;}
a:visited.Navlink {color : #808080;}
a:active.Navlink {text-decoration: none;}
a:hover.Navlink {text-decoration: none;}
-->
</style>
<script language="javascript"">
<!--
function LmOver(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#FFFFFF";
elem.style.cursor = 'hand'}
function LmOut(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#808080";}
function LmDown(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#FFFFFF";}
function LmUp(path)
{location.href = path;}
-->
</script>
Im Body
<td onMouseover="LmOver(this, '#808080')" onMouseout="LmOut(this, '#FFFFFF')" onMouseDown="LmDown(this, '#808080')" onmouseup="LmUp('#')" bgcolor="#FFFFFF" width="58"><a href="index.htm" class="navlink">Home</a></td>
Mein Problem: Wenn man über das Feld fährt wechselt es schön die Farbe, aber wenn man nicht über dem Text des Links ist, d.h. in einem Leerraum, dann wechselt es nicht zur gewünschten Seite.
Wie kann ich machen, dass das ganze Tabellenfeld als Link gilt?
Bin nicht so JS begabt.
Danke