Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
playground:playground [2014/09/23 09:19]
leuenberger
playground:playground [2019/07/10 13:26]
fachet created
Line 1: Line 1:
-====== ​NetModule Testpage  ​====== +~~NOCACHE~~ 
-===== Summary ​===== +====== ​Kabellängen ​====== 
-This is the summary of the test page+<​html>​ 
-===== Motivation ​===== +<!-- präsentiert von kostenlose-javascripts.de --> 
-The motivation is to test the wiki +<script type='​text/​javascript'>​ <!-- 
 +function berechnen() { 
 +   var bmi; 
 +   var weight ​document.bmiform.gewicht.value;​ 
 +   var height ​document.bmiform.groesse.value;​ 
 +   if (weight < 10 || weight > 200) { alert("​Falsches Gewicht.nBitte Daten erneut eingeben"​);​ return null; } 
 +   if (height < 50 || height > 250) { alert("​Falsche Grösse.nBitte Daten erneut eingeben"​);​ return null; } 
 +   ​bmi ​Math.round(weight / (Math.pow((height/​100),​2)));​ 
 +   ​output ​"Ihr BMI beträgt " + bmi + "​.\n";​ 
 +   if (bmi < 18) output +"Sie haben starkes Untergewicht.";​ 
 +   if (bmi == 18) output +"Sie haben deutliches Untergewicht.";​ 
 +   if (bmi == 19) output += "Sie haben leichtes Untergewicht.";​ 
 +   if (bmi >= 20 && bmi <= 24) output += "Dies liegt im idealen Bereich."; 
 +   if (bmi >25 && bmi <29) output +"Sie haben leichtes bis mässiges Übergewicht.";​ 
 +   if (bmi >30 && bmi <39) output +"Sie haben deutliches Übergewicht.";​ 
 +   if (bmi >40) output +"Sie haben sehr starkes Übergewicht.";​ 
 +   ​alert(output);​ 
 +
 +//--> 
 +</​script>​ 
 +<form name="​bmiform">​ 
 +<input type="​text"​ name="​groesse"​ /> 
 +Größe in cm<br /> 
 +<input type="​text"​ name="​gewicht"​ /> 
 +Gewicht in kg<br /> 
 +<input type="​button"​ name="​submit"​ value="​berechnen"​ onclick="​berechnen();">​ 
 +<br /> 
 +</​form>​ 
 +<br /> 
 +</​html>​