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="JavaScript">
function mondlander() {
var h = 40000;
var g = 375;
var g1 = 5;
var t = 600;
var s = 0;
while(h > 0 ) {
s = window.prompt("Wieviel Treibstoff verwenden Sie ?",0);
t = t -s;
g = g - s + g1;
h = h - g;
if (t > 0) {
window.alert("TREIBSTOFF IST ALLE !!!!!");
} elseif (h <= 0) {
if (g < 6) {
window.alert("CRASH");
} else {
window.alert("WEICHE LANDUNG");
}
}
}
</script>
</head>
<body bgcolor="#006699" onload="mondlander()">
</html>
Vielen Dank im Vorraus E-Mail: sven_gutschmidt@gmx.de
<html>
<head>
<script language="JavaScript">
function mondlander() {
var h = 40000;
var g = 375;
var g1 = 5;
var t = 600;
var s = 0;
while(h > 0 ) {
s = window.prompt("Wieviel Treibstoff verwenden Sie ?",0);
t = t -s;
g = g - s + g1;
h = h - g;
if (t > 0) {
window.alert("TREIBSTOFF IST ALLE !!!!!");
} elseif (h <= 0) {
if (g < 6) {
window.alert("CRASH");
} else {
window.alert("WEICHE LANDUNG");
}
}
}
</script>
</head>
<body bgcolor="#006699" onload="mondlander()">
</html>
Vielen Dank im Vorraus E-Mail: sven_gutschmidt@gmx.de