Sena: einfache funktion, wieso funktioniert sie aber nicht?

Beitrag lesen

Wieso funktioniert das script dieses mal nicht???? bitte kopieren und ausprobieren ! :(

<html>

<head> <title>Tabelle</title>

<meta name="" content=""> <base target="_blank"> <meta name="" content="">

<script language="JavaScript" type="text/javascript">  <!--

st = "a";  kfi = "b";  cl = "c";  gl = "d";  fo = "e";  cd = "f";

function tooltip() {

for (var i=0; i<document.getElementsByTagName("table").length; i++) {    for (var j=0; j<document.getElementsByTagName("table")[i].getElementsByTagName("td").length; j++) {     if (document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].firstChild.data=="ST"){ document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].title=st;}      else if (document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].firstChild.data=="KFI"){ document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].title=kfi;}       else if (document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].firstChild.data=="CL"){ document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].title=cl;}        else if (document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].firstChild.data=="GL"){ document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].title=gl;}         else if (document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].firstChild.data=="FO"){ document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].title=fo;}          else if (document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].firstChild.data=="CD"){ document.getElementsByTagName("table")[i].getElementsByTagName("td")[j].title=cd;}

}   } }

// --> </script>

</head>

<body onLoad="tooltip()" style="word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0">

<p style="line-height: 100%; word-spacing: 0; text-indent: 0; margin: 0">  </p>

<p style="line-height: 100%; word-spacing: 0; text-indent: 0; margin: 0" align="center"> </p> <table border="0" width="368" cellpadding="0" cellspacing="0">   <tr>     <td align="left" width="12"></td>     <td align="left" width="25"><font face="Arial" size="2">ST</font></td>     <td align="center" width="32"><font face="Arial" size="2">=</font></td>     <td width="317"><font face="Arial" size="2">a</font></td>   </tr>   <tr>     <td align="left" width="12"></td>     <td align="left" width="25"><font face="Arial" size="2">KFI</font></td>     <td align="center" width="32"><font face="Arial" size="2">=</font></td>     <td width="317"><font face="Arial" size="2">b</font></td>   </tr>   <tr>     <td align="left" width="12"></td>     <td align="left" width="25"><font face="Arial" size="2">CL</font></td>     <td align="center" width="32"><font face="Arial" size="2">=</font></td>     <td width="317"><font face="Arial" size="2">c</font></td>   </tr>   <tr>     <td align="left" width="12"></td>     <td align="left" width="25"><font face="Arial" size="2">GL</font></td>     <td align="center" width="32"><font face="Arial" size="2">=</font></td>     <td width="317"><font face="Arial" size="2">d</font></td>   </tr>   <tr>     <td align="left" width="12"></td>     <td align="left" width="25"><font face="Arial" size="2">FO</font></td>     <td align="center" width="32"><font face="Arial" size="2">=</font></td>     <td width="317"><font face="Arial" size="2">e</font></td>   </tr>   <tr>     <td align="left" width="12"></td>     <td align="left" width="25"><font face="Arial" size="2">CD</font></td>     <td align="center" width="32"><font face="Arial" size="2">=</font></td>     <td width="317"><font face="Arial" size="2">f</font></td>   </tr>   <tr>     <td align="left" width="12"></td>     <td align="left" width="25"></td>     <td align="center" width="32"></td>     <td width="317"></td>   </tr> </table> <table border="0" cellpadding="0" cellspacing="1" width="890">   <tr>     <td align="left" width="884">       <p align="right"><b><font size="2" face="Arial"></font></td>   </tr> </table>

<table border="1" width="889" height="1147" style="border-style: solid" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000">

<tr>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"><font size="2" face="Arial">FO</font></td>     <td width="460" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="204" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="122" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="37" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>   </tr>   <tr>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"><font face="Arial" size="2">GL</font></td>     <td width="460" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="204" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="122" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="37" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>   </tr>   <tr>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"><font face="Arial" size="2">GL</font></td>     <td width="460" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="204" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="122" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="37" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>   </tr>   <tr>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"><font size="2" face="Arial">FO</font></td>     <td width="460" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="204" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font face="Arial" size="2"></font></td>     <td width="122" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="37" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial">02</font></td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>   </tr>   <tr>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"> </td>     <td width="460" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font face="Arial" size="2"></font></td>     <td width="204" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font face="Arial" size="2"></font></td>     <td width="122" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font face="Arial" size="2"></font></td>     <td width="37" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial">00</font></td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>   </tr>   <tr>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"> </td>     <td width="34" height="19" bgcolor="#CCCCCC" align="center" style="border-style: solid"><font size="2" face="Arial">FO</font></td>     <td width="460" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="204" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial"></font></td>     <td width="122" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="37" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"><font size="2" face="Arial">02</font></td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>     <td width="45" align="center" height="19" bgcolor="#CCCCCC" style="border-style: solid"> </td>   </tr> </table>

<font face="Arial">

</font></body> </html>