MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus ultos.de
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „Das folgende JavaScript wird für alle Benutzer geladen.: $(function () { var myElement = document.getElementById('Umrechner'); myElement.innerHTML…“)
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 4: Zeile 4:
  
 
   var myElement = document.getElementById('Umrechner');
 
   var myElement = document.getElementById('Umrechner');
   myElement.innerHTML = '<center><font color = "white"><h1>L&auml;nge</h1></font></center>
+
   myElement.innerHTML = 'test';
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Meter (m)</option>
 
        <option value="1000">Millimeter (mm)</option>
 
        <option value="100">Zentimeter (cm)</option>
 
        <option value="10">Dezimeter (dm)</option>
 
        <option value="0.001">Kilometer (km)</option>
 
        <option value="2.979116394">Piet (p)</option>
 
        <option value="0.00290926">Myle (my)</option>
 
        <option value="0.000002841">Gyle (gy)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Meter (m)</option>
 
        <option value="1000">Millimeter (mm)</option>
 
        <option value="100">Zentimeter (cm)</option>
 
        <option value="10">Dezimeter (dm)</option>
 
        <option value="0.001">Kilometer (km)</option>
 
        <option value="2.979116394">Piet (p)</option>
 
        <option value="0.00290926">Myle (my)</option>
 
        <option value="0.000002841">Gyle (gy)</option>
 
 
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
<center><font color = "white"><h1>Fl&auml;che</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Quadratmeter (m^2)</option>
 
        <option value="1000000">Quadratmillimeter (mm^2)</option>
 
        <option value="10000">Quadratzentimeter (cm^2)</option>
 
        <option value="100">Quadratdezimeter (dm^2)</option>
 
        <option value="0.000001">Quadratkilometer (km^2)</option>
 
<option value="0.01">Ar (a)</option>
 
        <option value="0.0001">Hektar (ha)</option>
 
        <option value="8.875134489">Quadratpiet (p^2)</option>
 
        <option value="0.000008464">Quadratmyle (my^2)</option>
 
        <option value="0.000000000008071">Quadratgyle (gy^2)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Quadratmeter (m^2)</option>
 
        <option value="1000000">Quadratmillimeter (mm^2)</option>
 
        <option value="10000">Quadratzentimeter (cm^2)</option>
 
        <option value="100">Quadratdezimeter (dm^2)</option>
 
        <option value="0.000001">Quadratkilometer (km^2)</option>
 
<option value="0.01">Ar (a)</option>
 
        <option value="0.0001">Hektar (ha)</option>
 
        <option value="8.875134489">Quadratpiet (p^2)</option>
 
        <option value="0.000008464">Quadratmyle (my^2)</option>
 
        <option value="0.000000000008071">Quadratgyle (gy^2)</option>
 
 
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Volumen</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Kubikmeter (m^3)</option>
 
        <option value="1000000000">Kubikmillimeter (mm^3)</option>
 
        <option value="1000000">Kubikzentimeter (cm^3)</option>
 
        <option value="1000">Kubikdezimeter (dm^3)</option>
 
        <option value="0.000000001">Kubikkilometer (km^3)</option>
 
<option value="1000">Liter (l)</option>
 
        <option value="10">Hekoliter (hl)</option>
 
<option value="10000">Deziliter (dl)</option>
 
<option value="1000000">Milliliter (ml)</option>
 
        <option value="26.440058655">Kubikpiet (p^3)</option>
 
        <option value="0.000000025">Kubikmyle (my^3)</option>
 
        <option value="0.00000000000000002">Kubikgyle (gy^3)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Kubikmeter (m^3)</option>
 
        <option value="1000000000">Kubikmillimeter (mm^3)</option>
 
        <option value="1000000">Kubikzentimeter (cm^3)</option>
 
        <option value="1000">Kubikdezimeter (dm^3)</option>
 
        <option value="0.000000001">Kubikkilometer (km^3)</option>
 
<option value="1000">Liter (l)</option>
 
        <option value="10">Hekoliter (hl)</option>
 
<option value="10000">Deziliter (dl)</option>
 
<option value="1000000">Milliliter (ml)</option>
 
        <option value="26.440058655">Kubikpiet (p^3)</option>
 
        <option value="0.000000025">Kubikmyle (my^3)</option>
 
        <option value="0.00000000000000002">Kubikgyle (gy^3)</option>
 
 
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Masse</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Kilogramm (kg)</option>
 
        <option value="1000000">Miligramm (mg) </option>
 
        <option value="1000">Gramm (g)</option>
 
        <option value="0.001">Tonne (t)</option>
 
        <option value="2.738525578">Bris (b)</option>
 
        <option value="0.002673797">Fas (fa)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Kilogramm (kg)</option>
 
        <option value="1000000">Miligramm (mg) </option>
 
        <option value="1000">Gramm (g)</option>
 
        <option value="0.001">Tonne (t)</option>
 
        <option value="2.738525578">Bris (b)</option>
 
        <option value="0.002673797">Fas (fa)</option>
 
 
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Zeit</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Sekunden (s)</option>
 
        <option value="1000">Millisekunden (ms)</option>
 
        <option value="0.016666667">Minuten (min)</option>
 
        <option value="0.000277778">Stunden (h)</option>
 
        <option value="0.000011574">Tag (d)</option>
 
        <option value="0.831946755">Teta (t)</option>
 
<option value="0.051975052">Tride (tri)</option>
 
<option value="0.003246753">Deu (deu)</option>
 
<option value="0.000231267">Prot (Pr)</option>
 
<option value="0.000012692">Sol (S)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Sekunden (s)</option>
 
        <option value="1000">Millisekunden (ms)</option>
 
        <option value="0.016666667">Minuten (min)</option>
 
        <option value="0.000277778">Stunden (h)</option>
 
        <option value="0.000011574">Tag (d)</option>
 
        <option value="0.831946755">Teta (t)</option>
 
<option value="0.051975052">Tride (tri)</option>
 
<option value="0.003246753">Deu (deu)</option>
 
<option value="0.000231267">Prot (Pr)</option>
 
<option value="0.000012692">Sol (S)</option>
 
 
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
<center><font color = "white"><h1>Kraft</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Newton (N)</option>
 
        <option value="11.787269381">Brispiet je Tetaquadrat(b*p/t^2) </option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option value="1.0000">Newton (N)</option>
 
        <option selected value="11.787269381">Brispiet je Tetaquadrat(b*p/t^2) </option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Druck</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Pascal (Pa)</option>
 
        <option value="0.00001">Bar (bar)</option>
 
<option value="0.000009869"> Physik. Atmosphäre (atm)</option>
 
<option value="1.328122903">Bris je piet und tetaquadrat (b/p*s^2)</option>
 
<option value="0.001296995">Kisa Bris je piet und tetaquadrat (k b/p*s^2)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option value="1.0000">Pascal (Pa)</option>
 
        <option value="0.00001">Bar einheiten(bar)</option>
 
<option value="0.000009869"> Physik. Atmosphäre (atm)</option>
 
<option selected value="1.328122903">Bris je piet und tetaquadrat (b/p*s^2)</option>
 
<option value="0.001296995">Kisa Bris je piet und tetaquadrat (k b/p*s^2)</option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Energie</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Joule (J)</option>
 
        <option value="35.137034434">Jaul (j) </option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option value="1.0000">Joule (J)</option>
 
        <option selected value="35.137034434">Jaul (j) </option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFFFFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Leistung</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Watt (W)</option>
 
        <option value="42.22972973">Heul (H) </option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option value="1.0000">Watt (W)</option>
 
        <option selected value="42.22972973">Heul (H) </option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Ladung</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Coulomb (C)</option>
 
<option value="1000">Millicoulomb (mC)</option>
 
        <option value="118.389290031">Zirr (Z) </option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Coulomb (C)</option>
 
<option value="1000">Millicoulomb (mC)</option>
 
        <option value="118.389290031">Zirr (Z) </option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Stromst&auml;rke</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Ampaire (A)</option>
 
<option value="1000">Milliampaire (mA)</option>
 
        <option value="142.336597586">Tell (T) </option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option value="1.0000">Ampaire (A)</option>
 
<option value="1000">Milliampaire (mA)</option>
 
        <option selected value="142.336597586">Tell (T) </option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Spannung</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Volt (V)</option>
 
<option value="0.296742949">Colt (c)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option value="1.0000">Volt (V)</option>
 
<option selected value="0.296742949">Colt (c)</option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
 
 
 
 
 
 
<center><font color = "white"><h1>Temperatur</h1></font></center>
 
<form>
 
  <div align="center"><center><table border="0" cellpadding="2">
 
    <tr>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
 
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
 
    </tr>
 
    <tr>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
 
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
 
        <option selected value="1.0000">Kelvin (K)</option>
 
<option value="1.145094986">Ono (O)</option>
 
      </select> </font></td>
 
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
 
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
 
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
 
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
 
        <option value="1.0000">Kelvin (K)</option>
 
<option selected value="1.145094986">Ono (O)</option>
 
      </select> </font></td>
 
    </tr>
 
    <tr>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
 
      onchange="CvalueE(this.form)"></font></td>
 
      <td align="center" valign="middle" height="18"><font face="Verdana"
 
      color="#FFF"><input type="text" size="10" name="C"
 
      onchange="F.value = this.value/R.value"></font></td>
 
    </tr>
 
  </table>
 
  </center></div>
 
</form>
 
 
 
 
 
  
  
  
 +
}());
  
 
+
function AnalogueClock (varID, varSize, varRadius) {
<center><font color = "white"><h1>Stoffmenge</h1></font></center>
+
      this.id = varID;
<form>
+
      this.clockSize = varSize;
  <div align="center"><center><table border="0" cellpadding="2">
+
      this.clockRadius = varRadius;
    <tr>
+
       this.markers = [];
       <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
+
       this.pointers = [];
       <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
+
      this.svg;
       <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
+
      this.timer;
    </tr>
+
      this.inverted = false;
    <tr>
+
      this.textGenerator = function(num, max) {return num==0?max:num};
       <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
+
     
       onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
+
       this.addMarker = function(marker) {
         <option selected value="1.0000">Mol (mol)</option>
+
        this.markers.push(marker);
<option value="0.996254085">Durr (dur)</option>
+
      };
      </select> </font></td>
+
      this.addPointer = function(pointer) {
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
+
        this.pointers.push(pointer);
       type="reset" name="Reset" value="L&ouml;schen"></font></td>
+
      };
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
+
      this.invert = function() {
      onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
+
        this.inverted = !this.inverted;
        <option value="1.0000">Mol (mol)</option>
+
      };
<option selected value="0.996254085">Durr (dur)</option>
+
       this.setTextGenerator = function(f) {
      </select> </font></td>
+
        this.textGenerator = f;
    </tr>
+
      };
    <tr>
+
       this.updateClock = function() {
      <td align="center" valign="middle" height="18"><font face="Verdana"
+
         var arc = 0, d = new Date(),
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
+
        sSinceMidnight = (d.getTime() - d.setHours(0,0,0,0));
      onchange="CvalueE(this.form)"></font></td>
+
        for(var i = 0; i < this.pointers.length; i++) {
      <td align="center" valign="middle" height="18"><font face="Verdana"
+
          arc = (sSinceMidnight % this.pointers[i].speed) * 360.0 / this.pointers[i].speed;
      color="#FFF"><input type="text" size="10" name="R" value="1.00"
+
          arc = (this.inverted)?-arc:arc;
      onchange="CvalueE(this.form)"></font></td>
+
          this.pointers[i].node.setAttribute("transform", "rotate("+arc+")");
      <td align="center" valign="middle" height="18"><font face="Verdana"
+
        }
      color="#FFF"><input type="text" size="10" name="C"
+
      };
      onchange="F.value = this.value/R.value"></font></td>
+
       this.init = function() {
    </tr>
+
        var svgNode, defsNode, clockGroup, markerGroup, pointerGroup;
  </table>
+
        svgNode = createSVGNode("svg", { "id":this.id, "width":this.clockSize, "height":this.clockSize });
  </center></div>
+
       
</form>
+
        defsNode = createSVGNode("defs");
 
+
        var markerpos = {};
 
+
        for(var i = 0; i < this.markers.length; i++) {
 
+
          defsNode.appendChild(createSVGNode("line", { "id":(this.id+this.markers[i].id), "class":"markers", "x1":0, "y1":0, "x2":this.markers[i].size, "y2":0 }));
 
+
          var tmp = this.markers[i].count / 360.0;
 
+
          for(var j = 0; j < this.markers[i].count; j++) {
 
+
            if(!((j / tmp) in markerpos)) {
 
+
              markerpos[(j / tmp)] = i;
 
+
            }
<center><font color = "white"><h1>Vorsatz</h1></font></center>
+
          }
<form>
+
        }
  <div align="center"><center><table border="0" cellpadding="2">
+
        svgNode.appendChild(defsNode);
    <tr>
+
       
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Ausgangseinheit</strong></font></td>
+
        var centerPos = this.clockSize/2;
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Umrechnungszahl</strong></font></td>
+
        clockGroup = createSVGNode("g", { "class":"clock", "transform":("translate("+centerPos+", "+centerPos+")") });
      <td align="center" height="12"><font face="Verdana" color="#FFFFFF"><strong>Zieleinheit</strong></font></td>
+
        clockGroup.appendChild(createSVGNode("circle", { "class":"clocksurface", "fill":"none", "cx":0, "cy":0, "r":this.clockRadius }));
    </tr>
+
        markerGroup = createSVGNode("g");
    <tr>
+
        var thisMarker;
      <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TA"
+
        for(var pos in markerpos) {
      onchange="R.value = TB.options[TB.options.selectedIndex].value/this.options[selectedIndex].value; CvalueE(this.form)">
+
          thisMarker = this.markers[markerpos[pos]];
<option value="0.0000000001">Yotta (Y)</option>
+
          markerGroup.appendChild(createSVGNode("use", { "href":("#"+this.id+thisMarker.id), "x":(this.clockRadius-thisMarker.size), "transform":("rotate("+pos+")") }));
<option value="0.000000001">Zetta (Z)</option>
+
          //<text x="0" y="15" fill="red" transform="rotate(30 20,40)">I love SVG</text>
<option value="0.00000001">Exa (E)</option>
+
          if(thisMarker.numbers != 0) {
<option value="0.0000001">Peta (P)</option>
+
            var r = (this.clockRadius-thisMarker.textradius),
<option value="0.000001">Terra (T)</option>
+
            mPos = pos*thisMarker.numbers/360.,
<option value="0.00001">Giga (G)</option>
+
            x = (r*Math.sin(mPos*2*Math.PI/thisMarker.numbers)),
<option value="0.0001">Mega (M)</option>       
+
            y = (r*-Math.cos(mPos*2*Math.PI/thisMarker.numbers));
<option value="0.001">Kilo (k)</option>
+
            x = (this.inverted)?-x:x;
<option value="0.01">Hekto (h)</option>
+
            var node = createSVGNode("text", { "class":"textmarker", "id":(this.id+thisMarker.id), "text-anchor":"middle", "dominant-baseline":"middle", "x":x, "y":y }, this.textGenerator(mPos, thisMarker.numbers));
<option value="0.1">Deka (da)</option>
+
            markerGroup.appendChild(node);
<option selected value="1.000000000">- (-)</option>
+
          }
<option value="10">Dezi (µ)</option>
+
        }
<option value="100">Zenti (n)</option>
+
        clockGroup.appendChild(markerGroup);
<option value="1000">Milli (m)</option>
+
        pointerGroup = createSVGNode("g", { "class":"pointers" });
<option value="10000">Mikro (µ)</option>
+
        for(var i = 0; i < this.pointers.length; i++) {
<option value="100000">Nano (d)</option>
+
          this.pointers[i].node = createSVGNode("line", { "id":(this.id+this.pointers[i].id), "x1":0, "y1":0, "x2":0, "y2":(-this.pointers[i].size), "transform":"rotate(0)" })
<option value="1000000">Piko (p)</option>
+
          pointerGroup.appendChild(this.pointers[i].node);
<option value="10000000">Femto (f)</option>
+
        }
<option value="100000000">Atto (a)</option>
+
        clockGroup.appendChild(pointerGroup);
<option value="1000000000">Zepto (z)</option>
+
        svgNode.appendChild(clockGroup);
<option value="10000000000">Yokto (y)</option>
+
        this.svg = svgNode;
<option value="0.0009765625">Kisa (K)</option>
+
      };
<option value="0.0000009536743164">Esa (E)</option>
+
      this.getNode = function() {
<option value="0.0000000009313225746">Gesa (G)</option>
+
        return this.svg;
<option value="1024">Mido (M)</option>
+
      };
<option value="1048576">Faro (F)</option>
+
      this.startClock = function(interval) {
<option value="1073741824">Nado (N)</option>
+
        if (typeof (this.timer) !== 'undefined') {
      </select> </font></td>
+
          this.stopClock();
      <td align="center" valign="middle"><font face="Verdana" color="#FFFFFF"><input
+
        }
      type="reset" name="Reset" value="L&ouml;schen"></font></td>
+
        var tmp = this;
       <td align="center"><font face="Verdana" color="#FFFFFF"><select name="TB"
+
        this.timer = window.setInterval(function(){tmp.updateClock()}, interval);
       onchange="R.value = this.options[selectedIndex].value/TA.options[TA.options.selectedIndex].value; CvalueE(this.form)">
+
      };
<option value="0.0000000001">Yotta (Y)</option>
+
      this.stopClock = function() {
<option value="0.000000001">Zetta (Z)</option>
+
        window.clearInterval(this.timer);
<option value="0.00000001">Exa (E)</option>
+
      };
<option value="0.0000001">Peta (P)</option>
+
    }
<option value="0.000001">Terra (T)</option>
+
   
<option value="0.00001">Giga (G)</option>
+
    function DigitalClock (varID) {
<option value="0.0001">Mega (M)</option>       
+
      this.id = varID;
<option value="0.001">Kilo (k)</option>
+
      this.node;
<option value="0.01">Hekto (h)</option>
+
      this.timer;
<option value="0.1">Deka (da)</option>
+
      this.values = [];
<option selected value="1.000000000">- (-)</option>
+
      this.colon = true;
<option value="10">Dezi (µ)</option>
+
      this.textGenerator = function(num, max) {return ("00" + Math.floor(max * (num==1?0:num))).slice(-2)};
<option value="100">Zenti (n)</option>
+
     
<option value="1000">Milli (m)</option>
+
      this.addValue = function(value) {
<option value="10000">Mikro (µ)</option>
+
        this.values.push(value);
<option value="100000">Nano (d)</option>
+
      };
<option value="1000000">Piko (p)</option>
+
      this.setTextGenerator = function(f) {
<option value="10000000">Femto (f)</option>
+
        this.textGenerator = f;
<option value="100000000">Atto (a)</option>
+
      };
<option value="1000000000">Zepto (z)</option>
+
      this.disableColon = function() {
<option value="10000000000">Yokto (y)</option>
+
        this.colon = false;
<option value="0.0009765625">Kisa (K)</option>
+
      };
<option value="0.0000009536743164">Esa (E)</option>
+
      this.updateClock = function() {
<option value="0.0000000009313225746">Gesa (G)</option>
+
        var d = new Date(),
<option value="1024">Mido (M)</option>
+
        sSinceMidnight = (d.getTime() - d.setHours(0,0,0,0));
<option value="1048576">Faro (F)</option>
+
        for(var i = 0; i < this.values.length; i++) {
<option value="1073741824">Nado (N)</option>
+
          this.values[i].node.textContent = this.textGenerator((sSinceMidnight % this.values[i].speed) / this.values[i].speed, this.values[i].max);
       </select> </font></td>
+
        }
    </tr>
+
      };
    <tr>
+
      this.init = function() {
      <td align="center" valign="middle" height="18"><font face="Verdana"
+
        var node = createNode("span", { "id":this.id});
      color="#FFF"><input type="text" size="10" name="F" value="1.00"
+
        for(var i = 0; i < this.values.length; i++) {
       onchange="CvalueE(this.form)"></font></td>
+
          if(this.colon && i != 0)
      <td align="center" valign="middle" height="18"><font face="Verdana"
+
            node.insertAdjacentHTML("beforeend", ":");
       color="#FFF"><input type="text" size="10" name="R" value="1.00"
+
          this.values[i].node = createNode("span", { "id":this.values[i].id }, "--");
       onchange="CvalueE(this.form)"></font></td>
+
          node.appendChild(this.values[i].node);
      <td align="center" valign="middle" height="18"><font face="Verdana"
+
        }
       color="#FFF"><input type="text" size="10" name="C"
+
        this.node = node;
       onchange="F.value = this.value/R.value"></font></td>
+
      }
     </tr>
+
       this.getNode = function() {
  </table>
+
        return this.node;
  </center></div>
+
      };
</form>';
+
       this.startClock = function(interval) {
 
+
        if (typeof (this.timer) !== 'undefined') {
 
+
          this.stopClock();
 
+
        }
}());
+
        var tmp = this;
 +
        this.timer = window.setInterval(function(){tmp.updateClock()}, interval);
 +
      };
 +
      this.stopClock = function() {
 +
        window.clearInterval(this.timer);
 +
      };
 +
    }
 +
   
 +
    var clock1, clock2, clock3;
 +
    function init(){
 +
      clock1 = new AnalogueClock("clock1", 240, 117);
 +
      clock1.addMarker({ "id": "marker1", "count": 4, "size":(clock1.clockRadius/8), "numbers":12, "textradius":(clock1.clockRadius/5) });
 +
      clock1.addMarker({ "id": "marker2", "count": 12, "size":(clock1.clockRadius/16), "numbers":12, "textradius":(clock1.clockRadius/5) });
 +
      clock1.addMarker({ "id": "marker3", "count": 60, "size":(clock1.clockRadius/24), "numbers":0 });
 +
      clock1.addPointer({ "id": "pointer1", "speed":    60000, "size":(clock1.clockRadius) });
 +
      clock1.addPointer({ "id": "pointer2", "speed":  3600000, "size":(clock1.clockRadius*0.75) });
 +
      clock1.addPointer({ "id": "pointer3", "speed": 43200000, "size":(clock1.clockRadius*0.5) });
 +
      clock1.init();
 +
      clock1.startClock(200);
 +
      document.getElementById("analogueEarth").appendChild(clock1.getNode());
 +
     
 +
      clock2 = new AnalogueClock("clock2", 240, 117);
 +
      clock2.addMarker({ "id": "marker1", "count": 4, "size":(clock2.clockRadius/8), "numbers":16, "textradius":(clock2.clockRadius/4) });
 +
      clock2.addMarker({ "id": "marker2", "count": 8, "size":(clock2.clockRadius/16), "numbers":16, "textradius":(clock2.clockRadius/6) });
 +
       clock2.addMarker({ "id": "marker3", "count": 16, "size":(clock2.clockRadius/24), "numbers":16, "textradius":(clock2.clockRadius/6) });
 +
       //clock2.addMarker({ "id": "marker4", "count": 64, "size":(clock2.clockRadius/32), "numbers":0 });
 +
       clock2.addPointer({ "id": "pointer1", "speed": 16*1202.269, "size":(clock2.clockRadius) });
 +
       clock2.addPointer({ "id": "pointer2", "speed": 256*1202.269, "size":(clock2.clockRadius*0.8) });
 +
       clock2.addPointer({ "id": "pointer3", "speed": 16*256*1202.269, "size":(clock2.clockRadius*0.65) });
 +
       clock2.addPointer({ "id": "pointer4", "speed": 256*256*1202.269, "size":(clock2.clockRadius*0.5) });
 +
      clock2.invert();
 +
      clock2.setTextGenerator(function(num, max) {
 +
        return (+num).toString(16).toUpperCase();
 +
      });
 +
      clock2.init();
 +
      clock2.startClock(1202.2/4);
 +
      document.getElementById("analogueUltos").appendChild(clock2.getNode());
 +
     
 +
      clock3 = new DigitalClock("clock3");
 +
      clock3.addValue({ "id":  "hours", "speed": 86400000, "max":24 });
 +
      clock3.addValue({ "id": "minutes", "speed":  3600000, "max":60 });
 +
      clock3.addValue({ "id": "seconds", "speed":    60000, "max":60 });
 +
      clock3.init();
 +
      clock3.startClock(995);
 +
      document.getElementById("digitalEarth").appendChild(clock3.getNode());
 +
     
 +
      clock4 = new DigitalClock("clock4");
 +
      clock4.addValue({ "id": "t1", "speed": 256*256*1202.269, "max":16 });
 +
      clock4.addValue({ "id": "t2", "speed":  16*256*1202.269, "max":16 });
 +
      clock4.addValue({ "id": "t3", "speed":    256*1202.269, "max":16 });
 +
      clock4.addValue({ "id": "t4", "speed":      16*1202.269, "max":16 });
 +
      clock4.setTextGenerator(function(num, max) {
 +
        return (+Math.floor(num * max)).toString(16).toUpperCase();
 +
      });
 +
      clock4.disableColon();
 +
      clock4.init();
 +
      clock4.startClock(1111);
 +
      document.getElementById("digitalUltos").appendChild(clock4.getNode());
 +
    }
 +
   
 +
    const svgNS = "http://www.w3.org/2000/svg";
 +
    function createSVGNode(n, v, i) {
 +
      n = document.createElementNS(svgNS, n);
 +
      for (var p in v)
 +
        n.setAttribute(p, v[p]);
 +
      n.textContent = i;
 +
      return n
 +
    }
 +
    function createNode(n, v, i) {
 +
      n = document.createElement(n);
 +
      for (var p in v)
 +
        n.setAttribute(p, v[p]);
 +
      n.textContent = i;
 +
      return n
 +
     }

Version vom 4. Dezember 2019, 18:58 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */

$(function () {

  var myElement = document.getElementById('Umrechner');
  myElement.innerHTML = 'test';



}());

function AnalogueClock (varID, varSize, varRadius) {
      this.id = varID;
      this.clockSize = varSize;
      this.clockRadius = varRadius;
      this.markers = [];
      this.pointers = [];
      this.svg;
      this.timer;
      this.inverted = false;
      this.textGenerator = function(num, max) {return num==0?max:num};
      
      this.addMarker = function(marker) {
        this.markers.push(marker);
      };
      this.addPointer = function(pointer) {
        this.pointers.push(pointer);
      };
      this.invert = function() {
        this.inverted = !this.inverted;
      };
      this.setTextGenerator = function(f) {
        this.textGenerator = f;
      };
      this.updateClock = function() {
        var arc = 0, d = new Date(),
        sSinceMidnight = (d.getTime() - d.setHours(0,0,0,0));
        for(var i = 0; i < this.pointers.length; i++) {
          arc = (sSinceMidnight % this.pointers[i].speed) * 360.0 / this.pointers[i].speed;
          arc = (this.inverted)?-arc:arc;
          this.pointers[i].node.setAttribute("transform", "rotate("+arc+")");
        }
      };
      this.init = function() {
        var svgNode, defsNode, clockGroup, markerGroup, pointerGroup;
        svgNode = createSVGNode("svg", { "id":this.id, "width":this.clockSize, "height":this.clockSize });
        
        defsNode = createSVGNode("defs");
        var markerpos = {};
        for(var i = 0; i < this.markers.length; i++) {
          defsNode.appendChild(createSVGNode("line", { "id":(this.id+this.markers[i].id), "class":"markers", "x1":0, "y1":0, "x2":this.markers[i].size, "y2":0 }));
          var tmp = this.markers[i].count / 360.0;
          for(var j = 0; j < this.markers[i].count; j++) {
            if(!((j / tmp) in markerpos)) {
              markerpos[(j / tmp)] = i;
            }
          }
        }
        svgNode.appendChild(defsNode);
        
        var centerPos = this.clockSize/2;
        clockGroup = createSVGNode("g", { "class":"clock", "transform":("translate("+centerPos+", "+centerPos+")") });
        clockGroup.appendChild(createSVGNode("circle", { "class":"clocksurface", "fill":"none", "cx":0, "cy":0, "r":this.clockRadius }));
        markerGroup = createSVGNode("g");
        var thisMarker;
        for(var pos in markerpos) {
          thisMarker = this.markers[markerpos[pos]];
          markerGroup.appendChild(createSVGNode("use", { "href":("#"+this.id+thisMarker.id), "x":(this.clockRadius-thisMarker.size), "transform":("rotate("+pos+")") }));
          //<text x="0" y="15" fill="red" transform="rotate(30 20,40)">I love SVG</text>
          if(thisMarker.numbers != 0) {
            var r = (this.clockRadius-thisMarker.textradius),
            mPos = pos*thisMarker.numbers/360.,
            x = (r*Math.sin(mPos*2*Math.PI/thisMarker.numbers)),
            y = (r*-Math.cos(mPos*2*Math.PI/thisMarker.numbers));
            x = (this.inverted)?-x:x;
            var node = createSVGNode("text", { "class":"textmarker", "id":(this.id+thisMarker.id), "text-anchor":"middle", "dominant-baseline":"middle", "x":x, "y":y }, this.textGenerator(mPos, thisMarker.numbers));
            markerGroup.appendChild(node);
          }
        }
        clockGroup.appendChild(markerGroup);
        pointerGroup = createSVGNode("g", { "class":"pointers" });
        for(var i = 0; i < this.pointers.length; i++) {
          this.pointers[i].node = createSVGNode("line", { "id":(this.id+this.pointers[i].id), "x1":0, "y1":0, "x2":0, "y2":(-this.pointers[i].size), "transform":"rotate(0)" })
          pointerGroup.appendChild(this.pointers[i].node);
        }
        clockGroup.appendChild(pointerGroup);
        svgNode.appendChild(clockGroup);
        this.svg = svgNode;
      };
      this.getNode = function() {
        return this.svg;
      };
      this.startClock = function(interval) {
        if (typeof (this.timer) !== 'undefined') {
          this.stopClock();
        }
        var tmp = this;
        this.timer = window.setInterval(function(){tmp.updateClock()}, interval);
      };
      this.stopClock = function() {
        window.clearInterval(this.timer);
      };
    }
    
    function DigitalClock (varID) {
      this.id = varID;
      this.node;
      this.timer;
      this.values = [];
      this.colon = true;
      this.textGenerator = function(num, max) {return ("00" + Math.floor(max * (num==1?0:num))).slice(-2)}; 
      
      this.addValue = function(value) {
        this.values.push(value);
      };
      this.setTextGenerator = function(f) {
        this.textGenerator = f;
      };
      this.disableColon = function() {
        this.colon = false;
      };
      this.updateClock = function() {
        var d = new Date(),
        sSinceMidnight = (d.getTime() - d.setHours(0,0,0,0));
        for(var i = 0; i < this.values.length; i++) {
          this.values[i].node.textContent = this.textGenerator((sSinceMidnight % this.values[i].speed) / this.values[i].speed, this.values[i].max);
        }
      };
      this.init = function() {
        var node = createNode("span", { "id":this.id});
        for(var i = 0; i < this.values.length; i++) {
          if(this.colon && i != 0)
            node.insertAdjacentHTML("beforeend", ":");
          this.values[i].node = createNode("span", { "id":this.values[i].id }, "--");
          node.appendChild(this.values[i].node);
        }
        this.node = node;
      }
      this.getNode = function() {
        return this.node;
      };
      this.startClock = function(interval) {
        if (typeof (this.timer) !== 'undefined') {
          this.stopClock();
        }
        var tmp = this;
        this.timer = window.setInterval(function(){tmp.updateClock()}, interval);
      };
      this.stopClock = function() {
        window.clearInterval(this.timer);
      };
    }
    
    var clock1, clock2, clock3;
    function init(){
      clock1 = new AnalogueClock("clock1", 240, 117);
      clock1.addMarker({ "id": "marker1", "count": 4, "size":(clock1.clockRadius/8), "numbers":12, "textradius":(clock1.clockRadius/5) });
      clock1.addMarker({ "id": "marker2", "count": 12, "size":(clock1.clockRadius/16), "numbers":12, "textradius":(clock1.clockRadius/5) });
      clock1.addMarker({ "id": "marker3", "count": 60, "size":(clock1.clockRadius/24), "numbers":0 });
      clock1.addPointer({ "id": "pointer1", "speed":    60000, "size":(clock1.clockRadius) });
      clock1.addPointer({ "id": "pointer2", "speed":  3600000, "size":(clock1.clockRadius*0.75) });
      clock1.addPointer({ "id": "pointer3", "speed": 43200000, "size":(clock1.clockRadius*0.5) });
      clock1.init();
      clock1.startClock(200);
      document.getElementById("analogueEarth").appendChild(clock1.getNode());
      
      clock2 = new AnalogueClock("clock2", 240, 117);
      clock2.addMarker({ "id": "marker1", "count": 4, "size":(clock2.clockRadius/8), "numbers":16, "textradius":(clock2.clockRadius/4) });
      clock2.addMarker({ "id": "marker2", "count": 8, "size":(clock2.clockRadius/16), "numbers":16, "textradius":(clock2.clockRadius/6) });
      clock2.addMarker({ "id": "marker3", "count": 16, "size":(clock2.clockRadius/24), "numbers":16, "textradius":(clock2.clockRadius/6) });
      //clock2.addMarker({ "id": "marker4", "count": 64, "size":(clock2.clockRadius/32), "numbers":0 });
      clock2.addPointer({ "id": "pointer1", "speed": 16*1202.269, "size":(clock2.clockRadius) });
      clock2.addPointer({ "id": "pointer2", "speed": 256*1202.269, "size":(clock2.clockRadius*0.8) });
      clock2.addPointer({ "id": "pointer3", "speed": 16*256*1202.269, "size":(clock2.clockRadius*0.65) });
      clock2.addPointer({ "id": "pointer4", "speed": 256*256*1202.269, "size":(clock2.clockRadius*0.5) });
      clock2.invert();
      clock2.setTextGenerator(function(num, max) {
        return (+num).toString(16).toUpperCase();
      });
      clock2.init();
      clock2.startClock(1202.2/4);
      document.getElementById("analogueUltos").appendChild(clock2.getNode());
      
      clock3 = new DigitalClock("clock3");
      clock3.addValue({ "id":   "hours", "speed": 86400000, "max":24 });
      clock3.addValue({ "id": "minutes", "speed":  3600000, "max":60 });
      clock3.addValue({ "id": "seconds", "speed":    60000, "max":60 });
      clock3.init();
      clock3.startClock(995);
      document.getElementById("digitalEarth").appendChild(clock3.getNode());
      
      clock4 = new DigitalClock("clock4");
      clock4.addValue({ "id": "t1", "speed": 256*256*1202.269, "max":16 });
      clock4.addValue({ "id": "t2", "speed":  16*256*1202.269, "max":16 });
      clock4.addValue({ "id": "t3", "speed":     256*1202.269, "max":16 });
      clock4.addValue({ "id": "t4", "speed":      16*1202.269, "max":16 });
      clock4.setTextGenerator(function(num, max) {
        return (+Math.floor(num * max)).toString(16).toUpperCase();
      });
      clock4.disableColon();
      clock4.init();
      clock4.startClock(1111);
      document.getElementById("digitalUltos").appendChild(clock4.getNode());
    }
    
    const svgNS = "http://www.w3.org/2000/svg";
    function createSVGNode(n, v, i) {
      n = document.createElementNS(svgNS, n);
      for (var p in v)
        n.setAttribute(p, v[p]);
      n.textContent = i;
      return n
    }
    function createNode(n, v, i) {
      n = document.createElement(n);
      for (var p in v)
        n.setAttribute(p, v[p]);
      n.textContent = i;
      return n
    }