PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Mondlander


Spock
19.12.2001, 15:46
Hier hab ich mal nen Quellcode. Wie man sieht handelt es sich um eingebettetes Java Script. Einfache Frage: Warum läuft das nicht? (Das Script ist richt, meine ich)



<html>
<head>
<script language=&quot;JavaScript&quot;>

function mondlander() {
var h = 40000;
var g = 375;
var g1 = 5;
var t = 600;
var s = 0;
while(h > 0 ) {
s = window.prompt(&quot;Wieviel Treibstoff verwenden Sie ?&quot;,0);
t = t -s;
g = g - s + g1;
h = h - g;
if (t > 0) {
window.alert(&quot;TREIBSTOFF IST ALLE !!!!!&quot;);
} elseif (h <= 0) {
if (g < 6) {
window.alert(&quot;CRASH&quot;);
} else {
window.alert(&quot;WEICHE LANDUNG&quot;);
}
}
}

</script>
</head>
<body bgcolor=&quot;#006699&quot; onload=&quot;mondlander()&quot;>
</html>



Vielen Dank im Vorraus E-Mail: sven_gutschmidt@gmx.de


sami
20.12.2001, 14:03
elseif gibts ned in javascript