• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

externes js

Status
Für weitere Antworten geschlossen.

kennedys

Neues Mitglied
von java sript hab ich nich viel ahnung, daher hab ich eine sehr uneleganten htmlcode. ich möchte js jetzt extern machen, leider weiß ich nicht wie. hier ist mein code:
Code:
<table>

<tr>
 <td>


 </td>
</tr>

<tr>
 <td>
 <img src="space.gif" width="1" height="93" alt="" border="0" bordercolor="#000000">
   </td>
   <td>
   <img src="space.gif" width="90" height="1" alt="" border="0" bordercolor="#000000"><br>


 <a href="DSC00172.JPG" rel="lightbox[mofa]" title=" ''N'' VORBL&Auml;TTERN <BR>''P'' ZUR&Uuml;CKBL&Auml;TTERN"><img src="DSC00172k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
  </td>
   <td>
   <img src="space.gif" width="90" height="1" alt="" border="0" bordercolor="#000000"><br>


   <a href="DSC00173.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00173k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
   </td>
   <td>
   <img src="space.gif" width="90" height="1" alt="" border="0" bordercolor="#000000"><br>



   <a href="DSC00174.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00174k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
    </td>
   <td>
   <img src="space.gif" width="90" height="1" alt="" border="0" bordercolor="#000000"><br>



   <a href="DSC00175.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00175k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
    </td>
   <td>
   <img src="space.gif" width="90" height="1" alt="" border="0" bordercolor="#000000"><br>



   <a href="DSC00176.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00176k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a></td>



</tr>
<tr>
 <td>

 <img src="space.gif" width="1" height="75" alt="" border="0" bordercolor="#000000">

   </td>
   <td>

  <a href="DSC00177.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00177k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
     </td>
   <td>

   <a href="DSC00178.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00178k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
       </td>
   <td>

   <a href="DSC00179.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00179k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
       </td>
   <td>

   <a href="DSC00180.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00180k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
       </td>
   <td>

   <a href="DSC00181.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00181k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a></td>

</tr>
<tr>
 <td>

 <img src="space.gif" width="1" height="75" alt="" border="0" bordercolor="#000000">
    </td>
   <td>


 <a href="DSC00182.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00182k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
     </td>
   <td>

   <a href="DSC00183.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00183k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
      </td>
   <td>

   <a href="DSC00184.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00184k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
     </td>
   <td>

   <a href="DSC00185.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00185k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
      </td>
   <td>

   <a href="DSC00186.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00186k.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a></td>

</tr>
<tr>
 <td>

 <img src="space.gif" width="1" height="75" alt="" border="0" bordercolor="#000000">
      </td>
   <td>


 <a href="DSC00187.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00187.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>
       </td>
   <td>

   <a href="DSC00188.JPG" rel="lightbox[mofa]" title="Der Bau der H&uuml;tte"><img src="DSC00188.JPG" width="80" height="65" alt="" border="2" bordercolor="#000000" onmouseover="this.height = '70';
this.width = '85';"
onmouseout="this.height = '65';
this.width = '80';" /></a>


</td>



</tr>
</table>

kann mir jemand helfen
 
Howdy,

du schreibst am Besten erstmal das, was du immer gleich machst (veränderung von width und height) in eine js funktion,
wenn dus unbedingt mit js gemacht haben willst (css wäre meines erachtens angebrachter),
packst dieses Script dann in den Head ... das dürfte eig. reichen.

Solltest du es wirklich extern haben wollen, dann schreibst du dieses Script, speicherst es irgendwo auf dem Server und rufst es dann per
<script type="text/javascript" src="link_zum_script.js"></script>
auf.

lg,
n1ob
 
ich wusste nicht, dass das mit css geht.
ich kann css nur versehen und schreiben kann ich es nicht:cry:. es wäre nett wenn mir jemand sagen würde wie es geht.
 
Status
Für weitere Antworten geschlossen.
Zurück
Oben