#!/COMMUNITY
Members: 5374
davon online: 1
weitere User: 27
12.02.2012 / 10:11
Community-Member werden
|
Paßwort vergessen
|
OnlineMonitor (1)
Perl-Archiv
Forum
Javascript
Home
PERLscripts
PHPscripts
JAVAscripts
Hilfreiches
Links2www
Newscenter
Community
Interna
Javascript
Archivübersicht
Tutorials
Zum Forum
JS-Links
BuchTipps
WebForen
Forenübersicht
Neueste Themen
Ohne Antwort
Aktivste Themen
Themensuche
Forenarchiv
Newsgroups
Javascript » Formulare » Mathetrainer
zur Übersicht
Kategorie
Formulare
Bezeichnung
Mathetrainer
ScriptDemo
Neues Fenster für Demo öffnen
Statistik
10495 Aufrufe davon 1x gestern
Vielen Dank für dieses Script an
Christian Lembke
.
Javascript-Quellcode
(einfach markieren, kopieren und lokal abspeichern)
<script language="Javascript"> /*Dieses Script wurde von Christian Lembke erstellt und darf uneingeschränkt benutzt werden solange diese Zeilen nicht entfernt werden */ function zufallszahl1() { var Zahl1=Math.random() * 1000; Zahl1=Math.round(Zahl1); return(Zahl1); } function zufallszahl2() { var Zahl2=Math.random() * 1000; Zahl2=Math.round(Zahl2); return(Zahl2); } function rechnen() { var Zahl1=zufallszahl1() var Zahl2=zufallszahl2() var antwort=Zahl1 + Zahl2; var eingabe=window.prompt("Wie lautet die Summe von " + Zahl1 + " plus " + Zahl2 + " ?", "Die Antwort"); { if (eingabe == antwort) { window.alert("Richtig! Die Summe von " + Zahl1 + " und " + Zahl2 + " ist " + antwort + "!"); } else { window.alert("Falsch! " + eingabe + " ist nicht die Summe von " + Zahl1 + " und " + Zahl2 + ", sondern " + antwort + "!" ); } } } function zufallszahl3() { var Zahl3=Math.random() * 50; Zahl3=Math.round(Zahl3); return(Zahl3); } function zufallszahl4() { var Zahl4=Math.random() * 50; Zahl4=Math.round(Zahl4); return(Zahl4); } function multi() { var Zahl1=zufallszahl3() var Zahl2=zufallszahl4() var antwort2=Zahl1 * Zahl2; var eingabe2=window.prompt("Wie lautet das Ergebnis von " + Zahl1 + " mal " + Zahl2 + " ?", "Die Antwort"); { if (eingabe2 == antwort2) { window.alert("Richtig! Das Ergebnis von " + Zahl1 + " mal " + Zahl2 + " ist " + antwort2 + "!"); } else { window.alert("Falsch! " + eingabe2 + " ist nicht das Ergebnis von " + Zahl1 + " mal " + Zahl2 + ", sondern " + antwort2 + "!" ); } } } function subi() { var Zahl1=zufallszahl1() var Zahl2=zufallszahl2() var antwort2=Zahl1 - Zahl2; var eingabe2=window.prompt("Wie lautet das Ergebnis von " + Zahl1 + " minus " + Zahl2 + " ?", "Die Antwort"); { if (eingabe2 == antwort2) { window.alert("Richtig! Das Ergebnis von " + Zahl1 + " minus " + Zahl2 + " ist " + antwort2 + "!"); } else { window.alert("Falsch! " + eingabe2 + " ist nicht das Ergebnis von " + Zahl1 + " minus " + Zahl2 + ", sondern " + antwort2 + "!" ); } } } </script> <body> <form> <input type="button" value="(+)" onClick="rechnen()"> <input type="button" value="(*)" onClick="multi()"> <input type="button" value="(-)" onClick="subi()"> </form>
Kommentare zu
Mathetrainer
0 Kommentar(e) vorhanden / Anzeige der neuesten 5
Noch keine Kommentare zu diesem Javascript vorhanden.
Alle Kommentare anzeigen
-
Kommentar hinzufügen
© PERL/CGI/
PHP
/JS/SCRIPT/unity.de 1998-2009 .::.
interaktiv.shop
.::.
CGI-Service
.::.
Kontakt
.::.
Impressum
Link: /javascript/scripts/javascript_0240_main.shtml .::. Aufrufe heute: 1 .::. Aufrufe gesamt: 7333