Accueil > > > IRREGULAR VERBS TEST (LES VERBES IRRÉGULIERS(ANGLAIS))
IRREGULAR VERBS TEST (LES VERBES IRRÉGULIERS(ANGLAIS))
Information sur la source
Description
Une méthode interactive pour bien apprendre les verbes irrégulières !
Source
- <!--
-
- --------------------------------------------------
- Irregular verbs test
- Version 3 (2006)
- Développé par KARRAY Walid
- e.mail: walid.karray@gmail.com
- Sfax, Tunisie
- --------------------------------------------------
-
- -->
-
- <script language="JavaScript" type="text/javascript">
-
- // Verbes (Infinitive)
- var TAB_INF = new Array(
- "*","Be","Beat","Become","Begin","Bend","Bite","Bleed","Blow","Break","Bring","Build","Burn",
- "Burst","Buy","Catch","Choose","Come","Cost","Cut","Do","Draw","Dream","Drink","Drive",
- "Eat","Fall","Feed","Feel","Fight","Find","Fly","Forget","Forgive","Freeze","Get","Give",
- "Go","Grow","Hang","Have","Hear","Hide","Hit","Hold","Hurt","Keep","Kneel","Know","Lay",
- "Lead","Lean","Learn","Leave","Lend","Let","Lie","Light","Lose","Make","Mean","Meet",
- "Mistake","Pay","Prove","Put","Read","Ride","Ring","Rise","Run","Say","See","Sell","Send",
- "Set","Shake","Show","Shut","Sing","Sink","Sit","Sleep","Slide","Speak","Spell","Spend",
- "Spill","Spread","Spring","Stand","Steal","Stick","Sting","Sweep","Swell","Swim","Swing",
- "Take","Teach","Tear","Tell","Think","Throw","Understand","Wake","Wear","Weep","Wet","Win",
- "Wind","Write","Spoil","Bear","Creep","Flee","Forbid","Mow","Shine","Shoot","Smell","Sow",
- "Strike","Cling","Dig","Swear")
-
- // Verbes (Simple past)
- var TAB_SP = new Array(
- "*","was/were","Beat","Became","Began","Bent","Bit","Bled","Blew","Broke","Brought","Built","Burned",
- "Burst","Bought","Caught","Chose","Came","Cost","Cut","Did","Drew","Dreamed/dreamt","Drank",
- "Drove","Ate","Fell","Fed","Felt","Fought","Found","Flew","Forgot","Forgave","Froze","Got",
- "Gave","Went","Grew","Hung","Had","Heard","Hid","Hit","Held","Hurt","Kept","Knelt","Knew",
- "Laid","Led","Leaned","Learned","Left","Lent","Let","Lay","Lit/lighted","Lost","Made",
- "Meant","Met","Mistook","Paid","Proved","Put","Read","Rode","Rang","Rose","Ran","Said","Saw",
- "Sold","Sent","Set","Shook","Showed","Shut","Sang","Sank","Sat","Slept","Slide","Spoke",
- "Spelt","Spent","Spilt","Spread","Sprang","Stood","Stole","Stuck","Stung","Swept","Swelled",
- "Swam","Swung","Took","Taught","Tore","Told","Thought","Threw","Understood","Woke","Wore",
- "Wept","Wet","Won","Wound","Wrote","Spoiled/Spoilt","Bore","Crept","Fled","Forbade","Mowed",
- "Shone","Shot","Smelt","Sowed","Struck","Clung","Dug","Swore")
-
-
- // Verbes (Past participle)
- var TAB_PP = new Array(
- "*","Been","Beaten","Become","Begun","Bent","Bitten","Bled","Blown","Broken","Brought","Built",
- "Burned","Burst","Bought","Caught","Chosen","Come","Cost","Cut","Done ","Drawn","Dreamed/dreamt",
- "Drunk","Driven","Eaten","Fallen","Fed","Felt","Fought","Found","Flown","Forgotten","forgiven",
- "Frozen","Gotten/got","Given","Gone","Grown","Hung","Had","Heard","Hidden","Hit","Held","Hurt",
- "Kept","Knelt","known","Laid","Led","Leaned","Learned","Left","Lent","Let","Lain","Lit/lighted",
- "Lost","Made","Meant","Met","Mistaken","Paid","Proved/Proven","Put","Read","Ridden","Rung",
- "Risen","Run","Said","Seen","Sold","Sent","Set","Shaken","Showed/Shown","Shut","Sung","Sunk",
- "Sat","Slept","Slid","Spoken","Spelt","Spent","Spilt","Spread","Sprung","Stood","Stolen",
- "Stuck","Stung","Swept","Swelled","Swum","Swung","Taken","Taught","Torn","Told","Thought",
- "Thrown","Understood","Woken","Worn","Wept","Wet","Won","Wound","Written","Spoiled/Spoilt",
- "Born","Crept","Fled","forbidden","Mown","Shone","Shot","Smelt","Sown","Struck","Clung",
- "Dug","Sworn")
-
-
- var VerbeMax=125; // nombre maximale de verbes
- var TAB_Selection = new Array; // contient l'ordre aléatoire des verbes
- var TAB_Tense = new Array; // contient l'ordre aléatoire du temps (inf=1,past=2 ou p.part=3)
- var Position ; // indice courante
- var JeuMax ; // Le nombre de verbes choisi
- var PosMaxAtteint ; // Si on a arrivé au dernier verbe
-
- var TAB_Verif1 = new Array; // réponse : (infinitive)
- var TAB_Verif2 = new Array; // réponse : (past)
- var TAB_Verif3 = new Array; // réponse : (past participle)
-
- var Correction1 = new Array;// correction1[i] corrigé de TAB_Verif1[i] (si faux)
- var Correction2 = new Array;// correction2[i] corrigé de TAB_Verif2[i] (si faux)
- var Correction3 = new Array;// correction3[i] corrigé de TAB_Verif3[i] (si faux)
-
- var Score; // Score du jeu
- var temps ; // Temps atteint
- var Chargement=false ; // Si Chargement=false (le jeu est lancé pour la 1ere fois)
-
-
-
-
- // Initialisation du jeu
- function Demarrer(mainfrm)
- {
-
- JeuMax = mainfrm.txt_jeuverb.value ;
-
- if (JeuMax>125 || JeuMax<5) {
- JeuMax=10;
- mainfrm.txt_jeuverb.value=JeuMax ;
- }
-
- Position =0;
- PosMaxAtteint = false ;
- Generation_hasard(mainfrm);
-
- for (var i=1; i<=VerbeMax; i++) {
- TAB_Verif1[i]="";
- TAB_Verif2[i]="";
- TAB_Verif3[i]="";
- }
-
- ModifiePosition(mainfrm,1)
- temps = 0 ;
-
- if (Chargement == false) { incrTemps() } ;
- Chargement = true ;
-
- }
-
-
- // Supprime les espaces à gauche et à droite d'une chaine
- function Trim(mot){
- var l ;
- l = mot.length ;
- for (var i=1; i<=l; i++) {
- mot= mot.replace(" ","") ;
- }
- return mot ;
- }
-
- // Genearation du format du compteur ( X min et Y sec)
- function DeSecAMin(t)
- {
- var s;
- var min ;
- var sec ;
- min=Math.floor(t/60);
- sec = t % 60 ;
- s = min + " min and " + sec + " sec" ;
- return s;
- }
-
-
-
- // Incrémentation du compteur chaque seconde
- function incrTemps() {
- timer = setTimeout("incrTemps()",1000) ;
- mainfrm.BT_timer.value= DeSecAMin(temps)
- temps ++ ;
- }
-
- // Corriger les fautes
- function Corriger(mainfrm) {
-
- clearTimeout(timer);
- RefreshTabs(mainfrm);
- Score = 0 ;
-
- var i ;
- var k ;
-
- for (var i=1; i<=JeuMax; i++) {
-
- k=TAB_Selection [i] ;
-
- // initialisation
- Correction1[i]=""
- Correction2[i]=""
- Correction3[i]=""
-
-
- TAB_Verif1[i] = Trim(TAB_Verif1[i].toLowerCase()) ;
- TAB_Verif2[i] = Trim(TAB_Verif2[i].toLowerCase()) ;
- TAB_Verif3[i] = Trim(TAB_Verif3[i].toLowerCase()) ;
-
- if (TAB_Tense[i]!=1) {
- if (Comparer(TAB_Verif1[i], TAB_INF[k])==true ){
- Score ++
- }else{
- Correction1[i]="("+TAB_INF[k]+")"
- }
- }
-
- if (TAB_Tense[i]!=2) {
- if (Comparer(TAB_Verif2[i], TAB_SP[k])==true){
- Score ++
- }else{
- Correction2[i]="("+TAB_SP[k]+")"
- }
- }
-
- if (TAB_Tense[i]!=3) {
- if (Comparer(TAB_Verif3[i], TAB_PP[k])==true){
-
- Score ++
- }else{
-
- Correction3[i]="("+TAB_PP[k]+")"
- }
- }
-
- }
- }
-
-
- // Affiche les verbes stockés dans les textBox
- function Memoire(mainfrm){
- mainfrm.tbox_inf.value =TAB_Verif1[Position];
- mainfrm.tbox_sp.value= TAB_Verif2[Position] ;
- mainfrm.tbox_pp.value= TAB_Verif3[Position];
- }
-
-
- // Comparer deux chaines
- function Comparer(mot1,mot2) //Compare deux mots
- {
- var m ;
- var condition ;
- mot2 = mot2.toLowerCase()
- m = mot2.split("/") ; // Dans le cas où il existe 2 possibiltées de réponse
- // m[O]: 1ere possibilité et m[1]: 2éme possibilité
-
- condition = (mot1==m[0]) || (mot1==m[1]) ;
- return condition ;
- }
-
-
- // Générateur des nombres aléatoires dans l'intervalle [1,m]
- function rnd (mainfrm,m) { // Genérateur d'un nombre aléatoire
- var RETrnd;
- RETrnd = Math.floor( Math.random()*m )+1;
- return RETrnd;
- }
-
- // permuter deux éléments d'un tableau
- function permut(indice1,indice2) {
- var aux ;
- aux = TAB_Selection[indice1];
- TAB_Selection[indice1] = TAB_Selection[indice2];
- TAB_Selection[indice2] = aux ;
- }
-
-
- // Perturber les éléments d'un tableau au hasard
- // => l'ordre des verbes devient aléatoire
- function Generation_hasard(mainfrm) {
- var i ;
- for (var i=1; i<=VerbeMax; i++) {
- TAB_Selection[i]=i;
- TAB_Tense[i] = rnd (mainfrm,3)
- }
- for (var i=1; i<=VerbeMax; i++) {
- permut ( rnd (mainfrm,VerbeMax), rnd (mainfrm,VerbeMax));
- }
- }
-
-
- // Affectation des valeurs du TextBox vers le tableau.
- function RefreshTabs(mainfrm) {
- TAB_Verif1[Position]=mainfrm.tbox_inf.value;
- TAB_Verif2[Position]=mainfrm.tbox_sp.value;
- TAB_Verif3[Position]=mainfrm.tbox_pp.value;
-
- }
-
-
- // Modifie la postion (verbe suivant / verbe précédent)
- function ModifiePosition(mainfrm,sens)
- {
- RefreshTabs(mainfrm);
- if (sens==1) {
- if (Position < JeuMax) {
- Position ++;
- }
- }else{
- if (Position > 1) {
- Position --;
- }
- }
- if (Position == JeuMax ) {
- PosMaxAtteint=true ;
- }
- mainfrm.txt_position.value = Position+"/"+JeuMax ;
- var hasard_pos ;
- hasard_pos = TAB_Selection[Position] ;
-
- Memoire(mainfrm);
- switch (TAB_Tense[Position]) {
- case 1:
- mainfrm.tbox_inf.value = TAB_INF[hasard_pos];
- mainfrm.tbox_sp.select();
- break;
- case 2:
- mainfrm.tbox_sp.value= TAB_SP[hasard_pos];
- mainfrm.tbox_inf.select();
- break;
- case 3:
- mainfrm.tbox_pp.value= TAB_PP[hasard_pos];
- mainfrm.tbox_inf.select();
- break;
- }
-
- }
-
-
- // Génération d'un document Html pour
- // k=0 : affiche le résulat ou k=1 affiche la toute la liste des verbes irréguliers
- function AfficheResultat (mainfrm,k){
-
- var max;
-
- if (PosMaxAtteint==true || k == 1) {
-
- if (k==0) {
- Corriger(mainfrm) ;
- max= JeuMax ;
- }else{
- max = VerbeMax ;
- for (var i=1; i<=max; i++) {
-
- Correction1[i]=""
- Correction2[i]=""
- Correction3[i]=""
-
-
- TAB_Verif1[i] = TAB_INF[i] ;
- TAB_Verif2[i] = TAB_SP[i] ;
- TAB_Verif3[i] = TAB_PP[i] ;
- }
- }
-
- var genHtm ;
-
-
-
- genHtm = '<html><body bgcolor="#000066" text="#FFFFFF">' ;
-
- if (k==0) {
- genHtm = genHtm + '<center><font size="5" color="#00FF99"><u><b>Test correction</b></u></font></center>' ;
- }else{
- genHtm = genHtm + '<center><font size="5" color="#00FF99"><u>Table of irregular verbs</u></font></center>' ;
- }
-
-
- genHtm = genHtm + ' <br />' ;
-
- genHtm = genHtm + ' <hr align="center" />'
- genHtm = genHtm + ' <center><b> <font size="3" color="#CC0000">'
- genHtm = genHtm + ' <br /> '
-
- if (k==0) {
- genHtm = genHtm + ' Mark: '+Score+'/'+(JeuMax*3-JeuMax)
- genHtm = genHtm + '<br /> Test duration ' + DeSecAMin(temps)
- }
- genHtm = genHtm + ' </font> </b></center> <br /> <table align="center" border="2">';
- genHtm = genHtm + ' <tr>';
- genHtm = genHtm + ' <td><b><center>Verb n°</center></b></td>' ;
- genHtm = genHtm + ' <td><b><center>Infinitive</center></b></td>';
- genHtm = genHtm + ' <td><b><center>Simple past</center></b></td>' ;
- genHtm = genHtm + ' <td><b><center>Past participle</center></b></td>';
- genHtm = genHtm + ' </tr>';
-
-
-
-
- for (var i=1; i<=max; i++) {
-
- genHtm = genHtm + ' <tr> <td><center><b>'+i+'</b></center></td>';
-
- genHtm = genHtm + '<td bgcolor="#000000">'+ TAB_Verif1[i] +'<font size="3" color="#FF0000"><b>'+ Correction1[i] + '</b></font></td>';
- genHtm = genHtm + '<td bgcolor="#000000">'+ TAB_Verif2[i] +'<font size="3" color="#FF0000"><b>'+ Correction2[i] + '</b></font></td>' ;
- genHtm = genHtm + '<td bgcolor="#000000">'+ TAB_Verif3[i] +'<font size="3" color="#FF0000"><b>'+ Correction3[i] + '</b></font></td>';
-
- }
-
-
- genHtm = genHtm + ' </tr> </table> <br /> </body></html>';
- genHtm = genHtm + '<center><input type="button" name="FermeCmd" value="Replay" tabindex="0" onclick="history.go(-1)" /> </center> </form>'
-
- document.write(genHtm);
-
- } // Fin de la condition
- } // Fin de la fonction
-
- </script>
-
-
- <html>
-
- <head>
- <title>Irregular verbs test</title>
- </head>
-
- <body bgcolor="#000066" text="#FFFFFF" onload="Demarrer(mainfrm)">
-
- <form method="POST" action="--WEBBOT-SELF--" name="mainfrm">
-
- <p> </p>
- <p align="center"><font size="6" color="#FFFFCC">Irregular verbs test
- Version 3.0</font></p>
- <div align="center">
- <center>
- <table border="1" width="373" height="128" bgcolor="#ECE9D8">
- <tr>
- <td width="170" height="18" bgcolor="#CCCCCC"><font size="4" color="#000000">Tense</font></td>
- <td width="187" height="18" bgcolor="#CCCCCC"><font size="4" color="#000000">Verb</font></td>
- </tr>
- <tr>
- <td width="170" height="32" bgcolor="#CCCCCC"><font size="4" color="#000000">Infinitive</font></td>
- <td width="187" height="32" bgcolor="#FFFFFF">
- <p align="center"><input type="text" name="tbox_inf" size="20" style="font-size: 12 pt"></td>
- </tr>
- <tr>
- <td width="170" height="30" bgcolor="#CCCCCC"><font size="4" color="#000000">Simple
- past</font></td>
- <td width="187" height="32" bgcolor="#FFFFFF">
- <p align="center"><input type="text" name="tbox_sp" size="20" style="font-size: 12 pt"></td>
- </tr>
- <tr>
- <td width="170" height="31" bgcolor="#CCCCCC"><font size="4" color="#000000">Past
- participle</font></td>
- <td width="187" height="32" bgcolor="#FFFFFF">
- <p align="center"><input type="text" name="tbox_pp" size="20" style="font-size: 12 pt"></td>
- </tr>
- </table>
- </center>
- </div>
- <br />
- <center> <input type="text" name="BT_timer" value="00 : 00" style="border: outset; background: #CCCCCC; color: #000000;text-align: center" readonly="readonly" /> </center>
- <br />
- <div align="center">
-
- <center>
- <table width="634" height="129" bgcolor="#ECE9D8" style="border: outset">
- <tr>
- <td width="634" height="129">
- <div align="center">
- <table border="0" width="592" height="65">
- <tr>
- <td width="338" height="65" rowspan="2" valign="top" bgcolor="#ECE9D8"><font color="#000000"><input type="button" value=" Restart " name="B1" style="background-color: #FF0000" onclick="Demarrer(mainfrm)">
- Number of verbs (124 max) = <!--webbot bot="Validation"
- S-Data-Type="Integer" S-Number-Separators="x"
- S-Validation-Constraint="Greater than or equal to"
- S-Validation-Value="1" --><input type="text" name="txt_jeuverb" size="3" value="10"></font></td>
- <td width="244" height="49" valign="bottom" bgcolor="#ECE9D8">
- <p align="left"><font color="#000000"> <input type="button" value="< Previous" name="B2" onclick="ModifiePosition(mainfrm,2)">
- <input type="button" value="Next >" name="B3" onclick="ModifiePosition(mainfrm,1)"></font></td>
- </tr>
- <tr>
- <td width="244" height="8" valign="bottom" bgcolor="#ECE9D8">
- <p align="center"><font color="#000000">Position = <!--webbot
- bot="Validation" S-Data-Type="Integer" S-Number-Separators="x"
- S-Validation-Constraint="Greater than or equal to"
- S-Validation-Value="1" --><input type="text" name="txt_position" size="5" readonly="readonly"></font></td>
- </tr>
- </table>
- </div>
- <div align="center">
- <table border="0" width="592" height="28">
- <tr>
- <td width="343" height="28" valign="bottom" bgcolor="#ECE9D8">
- <p align="left"><font color="#000000"><input type="button" value="Table of irregular verbs" name="B5" onclick="AfficheResultat (mainfrm,1)"></font></td>
- <td width="239" height="28" bgcolor="#ECE9D8">
- <p align="left"><font color="#000000"><input type="button" value="autocorrection" name="B4" style="background-color: #CCCCFF; border-style: ridge" onclick="AfficheResultat (mainfrm,0)"></font></td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
- </center>
- </div>
- <p> </p>
- <div align="center">
-
- <center>
- <table border="0" width="886" height="23">
- <tr>
- <td width="540" height="23"><font color="#C0C0C0">Designed by KARRAY
- Walid. June 2006 Version 3.0. Sfax, TUNISIA</font></td>
- </center>
- <td width="336" height="23">
- <p align="right"><font color="#C0C0C0"><a href="mailto:walid.karray@gmail.com" style="color: #FFFFCC">e.mail:
- walid.karray@gmail.com</a></font></td>
- </tr>
- </table>
- </div>
- <p> </p>
- <p> </p>
- <p> </p>
-
- </form>
- <p> </p>
- <p> </p>
-
- </body>
-
- </html>
-
-
<!--
--------------------------------------------------
Irregular verbs test
Version 3 (2006)
Développé par KARRAY Walid
e.mail: walid.karray@gmail.com
Sfax, Tunisie
--------------------------------------------------
-->
<script language="JavaScript" type="text/javascript">
// Verbes (Infinitive)
var TAB_INF = new Array(
"*","Be","Beat","Become","Begin","Bend","Bite","Bleed","Blow","Break","Bring","Build","Burn",
"Burst","Buy","Catch","Choose","Come","Cost","Cut","Do","Draw","Dream","Drink","Drive",
"Eat","Fall","Feed","Feel","Fight","Find","Fly","Forget","Forgive","Freeze","Get","Give",
"Go","Grow","Hang","Have","Hear","Hide","Hit","Hold","Hurt","Keep","Kneel","Know","Lay",
"Lead","Lean","Learn","Leave","Lend","Let","Lie","Light","Lose","Make","Mean","Meet",
"Mistake","Pay","Prove","Put","Read","Ride","Ring","Rise","Run","Say","See","Sell","Send",
"Set","Shake","Show","Shut","Sing","Sink","Sit","Sleep","Slide","Speak","Spell","Spend",
"Spill","Spread","Spring","Stand","Steal","Stick","Sting","Sweep","Swell","Swim","Swing",
"Take","Teach","Tear","Tell","Think","Throw","Understand","Wake","Wear","Weep","Wet","Win",
"Wind","Write","Spoil","Bear","Creep","Flee","Forbid","Mow","Shine","Shoot","Smell","Sow",
"Strike","Cling","Dig","Swear")
// Verbes (Simple past)
var TAB_SP = new Array(
"*","was/were","Beat","Became","Began","Bent","Bit","Bled","Blew","Broke","Brought","Built","Burned",
"Burst","Bought","Caught","Chose","Came","Cost","Cut","Did","Drew","Dreamed/dreamt","Drank",
"Drove","Ate","Fell","Fed","Felt","Fought","Found","Flew","Forgot","Forgave","Froze","Got",
"Gave","Went","Grew","Hung","Had","Heard","Hid","Hit","Held","Hurt","Kept","Knelt","Knew",
"Laid","Led","Leaned","Learned","Left","Lent","Let","Lay","Lit/lighted","Lost","Made",
"Meant","Met","Mistook","Paid","Proved","Put","Read","Rode","Rang","Rose","Ran","Said","Saw",
"Sold","Sent","Set","Shook","Showed","Shut","Sang","Sank","Sat","Slept","Slide","Spoke",
"Spelt","Spent","Spilt","Spread","Sprang","Stood","Stole","Stuck","Stung","Swept","Swelled",
"Swam","Swung","Took","Taught","Tore","Told","Thought","Threw","Understood","Woke","Wore",
"Wept","Wet","Won","Wound","Wrote","Spoiled/Spoilt","Bore","Crept","Fled","Forbade","Mowed",
"Shone","Shot","Smelt","Sowed","Struck","Clung","Dug","Swore")
// Verbes (Past participle)
var TAB_PP = new Array(
"*","Been","Beaten","Become","Begun","Bent","Bitten","Bled","Blown","Broken","Brought","Built",
"Burned","Burst","Bought","Caught","Chosen","Come","Cost","Cut","Done ","Drawn","Dreamed/dreamt",
"Drunk","Driven","Eaten","Fallen","Fed","Felt","Fought","Found","Flown","Forgotten","forgiven",
"Frozen","Gotten/got","Given","Gone","Grown","Hung","Had","Heard","Hidden","Hit","Held","Hurt",
"Kept","Knelt","known","Laid","Led","Leaned","Learned","Left","Lent","Let","Lain","Lit/lighted",
"Lost","Made","Meant","Met","Mistaken","Paid","Proved/Proven","Put","Read","Ridden","Rung",
"Risen","Run","Said","Seen","Sold","Sent","Set","Shaken","Showed/Shown","Shut","Sung","Sunk",
"Sat","Slept","Slid","Spoken","Spelt","Spent","Spilt","Spread","Sprung","Stood","Stolen",
"Stuck","Stung","Swept","Swelled","Swum","Swung","Taken","Taught","Torn","Told","Thought",
"Thrown","Understood","Woken","Worn","Wept","Wet","Won","Wound","Written","Spoiled/Spoilt",
"Born","Crept","Fled","forbidden","Mown","Shone","Shot","Smelt","Sown","Struck","Clung",
"Dug","Sworn")
var VerbeMax=125; // nombre maximale de verbes
var TAB_Selection = new Array; // contient l'ordre aléatoire des verbes
var TAB_Tense = new Array; // contient l'ordre aléatoire du temps (inf=1,past=2 ou p.part=3)
var Position ; // indice courante
var JeuMax ; // Le nombre de verbes choisi
var PosMaxAtteint ; // Si on a arrivé au dernier verbe
var TAB_Verif1 = new Array; // réponse : (infinitive)
var TAB_Verif2 = new Array; // réponse : (past)
var TAB_Verif3 = new Array; // réponse : (past participle)
var Correction1 = new Array;// correction1[i] corrigé de TAB_Verif1[i] (si faux)
var Correction2 = new Array;// correction2[i] corrigé de TAB_Verif2[i] (si faux)
var Correction3 = new Array;// correction3[i] corrigé de TAB_Verif3[i] (si faux)
var Score; // Score du jeu
var temps ; // Temps atteint
var Chargement=false ; // Si Chargement=false (le jeu est lancé pour la 1ere fois)
// Initialisation du jeu
function Demarrer(mainfrm)
{
JeuMax = mainfrm.txt_jeuverb.value ;
if (JeuMax>125 || JeuMax<5) {
JeuMax=10;
mainfrm.txt_jeuverb.value=JeuMax ;
}
Position =0;
PosMaxAtteint = false ;
Generation_hasard(mainfrm);
for (var i=1; i<=VerbeMax; i++) {
TAB_Verif1[i]="";
TAB_Verif2[i]="";
TAB_Verif3[i]="";
}
ModifiePosition(mainfrm,1)
temps = 0 ;
if (Chargement == false) { incrTemps() } ;
Chargement = true ;
}
// Supprime les espaces à gauche et à droite d'une chaine
function Trim(mot){
var l ;
l = mot.length ;
for (var i=1; i<=l; i++) {
mot= mot.replace(" ","") ;
}
return mot ;
}
// Genearation du format du compteur ( X min et Y sec)
function DeSecAMin(t)
{
var s;
var min ;
var sec ;
min=Math.floor(t/60);
sec = t % 60 ;
s = min + " min and " + sec + " sec" ;
return s;
}
// Incrémentation du compteur chaque seconde
function incrTemps() {
timer = setTimeout("incrTemps()",1000) ;
mainfrm.BT_timer.value= DeSecAMin(temps)
temps ++ ;
}
// Corriger les fautes
function Corriger(mainfrm) {
clearTimeout(timer);
RefreshTabs(mainfrm);
Score = 0 ;
var i ;
var k ;
for (var i=1; i<=JeuMax; i++) {
k=TAB_Selection [i] ;
// initialisation
Correction1[i]=""
Correction2[i]=""
Correction3[i]=""
TAB_Verif1[i] = Trim(TAB_Verif1[i].toLowerCase()) ;
TAB_Verif2[i] = Trim(TAB_Verif2[i].toLowerCase()) ;
TAB_Verif3[i] = Trim(TAB_Verif3[i].toLowerCase()) ;
if (TAB_Tense[i]!=1) {
if (Comparer(TAB_Verif1[i], TAB_INF[k])==true ){
Score ++
}else{
Correction1[i]="("+TAB_INF[k]+")"
}
}
if (TAB_Tense[i]!=2) {
if (Comparer(TAB_Verif2[i], TAB_SP[k])==true){
Score ++
}else{
Correction2[i]="("+TAB_SP[k]+")"
}
}
if (TAB_Tense[i]!=3) {
if (Comparer(TAB_Verif3[i], TAB_PP[k])==true){
Score ++
}else{
Correction3[i]="("+TAB_PP[k]+")"
}
}
}
}
// Affiche les verbes stockés dans les textBox
function Memoire(mainfrm){
mainfrm.tbox_inf.value =TAB_Verif1[Position];
mainfrm.tbox_sp.value= TAB_Verif2[Position] ;
mainfrm.tbox_pp.value= TAB_Verif3[Position];
}
// Comparer deux chaines
function Comparer(mot1,mot2) //Compare deux mots
{
var m ;
var condition ;
mot2 = mot2.toLowerCase()
m = mot2.split("/") ; // Dans le cas où il existe 2 possibiltées de réponse
// m[O]: 1ere possibilité et m[1]: 2éme possibilité
condition = (mot1==m[0]) || (mot1==m[1]) ;
return condition ;
}
// Générateur des nombres aléatoires dans l'intervalle [1,m]
function rnd (mainfrm,m) { // Genérateur d'un nombre aléatoire
var RETrnd;
RETrnd = Math.floor( Math.random()*m )+1;
return RETrnd;
}
// permuter deux éléments d'un tableau
function permut(indice1,indice2) {
var aux ;
aux = TAB_Selection[indice1];
TAB_Selection[indice1] = TAB_Selection[indice2];
TAB_Selection[indice2] = aux ;
}
// Perturber les éléments d'un tableau au hasard
// => l'ordre des verbes devient aléatoire
function Generation_hasard(mainfrm) {
var i ;
for (var i=1; i<=VerbeMax; i++) {
TAB_Selection[i]=i;
TAB_Tense[i] = rnd (mainfrm,3)
}
for (var i=1; i<=VerbeMax; i++) {
permut ( rnd (mainfrm,VerbeMax), rnd (mainfrm,VerbeMax));
}
}
// Affectation des valeurs du TextBox vers le tableau.
function RefreshTabs(mainfrm) {
TAB_Verif1[Position]=mainfrm.tbox_inf.value;
TAB_Verif2[Position]=mainfrm.tbox_sp.value;
TAB_Verif3[Position]=mainfrm.tbox_pp.value;
}
// Modifie la postion (verbe suivant / verbe précédent)
function ModifiePosition(mainfrm,sens)
{
RefreshTabs(mainfrm);
if (sens==1) {
if (Position < JeuMax) {
Position ++;
}
}else{
if (Position > 1) {
Position --;
}
}
if (Position == JeuMax ) {
PosMaxAtteint=true ;
}
mainfrm.txt_position.value = Position+"/"+JeuMax ;
var hasard_pos ;
hasard_pos = TAB_Selection[Position] ;
Memoire(mainfrm);
switch (TAB_Tense[Position]) {
case 1:
mainfrm.tbox_inf.value = TAB_INF[hasard_pos];
mainfrm.tbox_sp.select();
break;
case 2:
mainfrm.tbox_sp.value= TAB_SP[hasard_pos];
mainfrm.tbox_inf.select();
break;
case 3:
mainfrm.tbox_pp.value= TAB_PP[hasard_pos];
mainfrm.tbox_inf.select();
break;
}
}
// Génération d'un document Html pour
// k=0 : affiche le résulat ou k=1 affiche la toute la liste des verbes irréguliers
function AfficheResultat (mainfrm,k){
var max;
if (PosMaxAtteint==true || k == 1) {
if (k==0) {
Corriger(mainfrm) ;
max= JeuMax ;
}else{
max = VerbeMax ;
for (var i=1; i<=max; i++) {
Correction1[i]=""
Correction2[i]=""
Correction3[i]=""
TAB_Verif1[i] = TAB_INF[i] ;
TAB_Verif2[i] = TAB_SP[i] ;
TAB_Verif3[i] = TAB_PP[i] ;
}
}
var genHtm ;
genHtm = '<html><body bgcolor="#000066" text="#FFFFFF">' ;
if (k==0) {
genHtm = genHtm + '<center><font size="5" color="#00FF99"><u><b>Test correction</b></u></font></center>' ;
}else{
genHtm = genHtm + '<center><font size="5" color="#00FF99"><u>Table of irregular verbs</u></font></center>' ;
}
genHtm = genHtm + ' <br />' ;
genHtm = genHtm + ' <hr align="center" />'
genHtm = genHtm + ' <center><b> <font size="3" color="#CC0000">'
genHtm = genHtm + ' <br /> '
if (k==0) {
genHtm = genHtm + ' Mark: '+Score+'/'+(JeuMax*3-JeuMax)
genHtm = genHtm + '<br /> Test duration ' + DeSecAMin(temps)
}
genHtm = genHtm + ' </font> </b></center> <br /> <table align="center" border="2">';
genHtm = genHtm + ' <tr>';
genHtm = genHtm + ' <td><b><center>Verb n°</center></b></td>' ;
genHtm = genHtm + ' <td><b><center>Infinitive</center></b></td>';
genHtm = genHtm + ' <td><b><center>Simple past</center></b></td>' ;
genHtm = genHtm + ' <td><b><center>Past participle</center></b></td>';
genHtm = genHtm + ' </tr>';
for (var i=1; i<=max; i++) {
genHtm = genHtm + ' <tr> <td><center><b>'+i+'</b></center></td>';
genHtm = genHtm + '<td bgcolor="#000000">'+ TAB_Verif1[i] +'<font size="3" color="#FF0000"><b>'+ Correction1[i] + '</b></font></td>';
genHtm = genHtm + '<td bgcolor="#000000">'+ TAB_Verif2[i] +'<font size="3" color="#FF0000"><b>'+ Correction2[i] + '</b></font></td>' ;
genHtm = genHtm + '<td bgcolor="#000000">'+ TAB_Verif3[i] +'<font size="3" color="#FF0000"><b>'+ Correction3[i] + '</b></font></td>';
}
genHtm = genHtm + ' </tr> </table> <br /> </body></html>';
genHtm = genHtm + '<center><input type="button" name="FermeCmd" value="Replay" tabindex="0" onclick="history.go(-1)" /> </center> </form>'
document.write(genHtm);
} // Fin de la condition
} // Fin de la fonction
</script>
<html>
<head>
<title>Irregular verbs test</title>
</head>
<body bgcolor="#000066" text="#FFFFFF" onload="Demarrer(mainfrm)">
<form method="POST" action="--WEBBOT-SELF--" name="mainfrm">
<p> </p>
<p align="center"><font size="6" color="#FFFFCC">Irregular verbs test
Version 3.0</font></p>
<div align="center">
<center>
<table border="1" width="373" height="128" bgcolor="#ECE9D8">
<tr>
<td width="170" height="18" bgcolor="#CCCCCC"><font size="4" color="#000000">Tense</font></td>
<td width="187" height="18" bgcolor="#CCCCCC"><font size="4" color="#000000">Verb</font></td>
</tr>
<tr>
<td width="170" height="32" bgcolor="#CCCCCC"><font size="4" color="#000000">Infinitive</font></td>
<td width="187" height="32" bgcolor="#FFFFFF">
<p align="center"><input type="text" name="tbox_inf" size="20" style="font-size: 12 pt"></td>
</tr>
<tr>
<td width="170" height="30" bgcolor="#CCCCCC"><font size="4" color="#000000">Simple
past</font></td>
<td width="187" height="32" bgcolor="#FFFFFF">
<p align="center"><input type="text" name="tbox_sp" size="20" style="font-size: 12 pt"></td>
</tr>
<tr>
<td width="170" height="31" bgcolor="#CCCCCC"><font size="4" color="#000000">Past
participle</font></td>
<td width="187" height="32" bgcolor="#FFFFFF">
<p align="center"><input type="text" name="tbox_pp" size="20" style="font-size: 12 pt"></td>
</tr>
</table>
</center>
</div>
<br />
<center> <input type="text" name="BT_timer" value="00 : 00" style="border: outset; background: #CCCCCC; color: #000000;text-align: center" readonly="readonly" /> </center>
<br />
<div align="center">
<center>
<table width="634" height="129" bgcolor="#ECE9D8" style="border: outset">
<tr>
<td width="634" height="129">
<div align="center">
<table border="0" width="592" height="65">
<tr>
<td width="338" height="65" rowspan="2" valign="top" bgcolor="#ECE9D8"><font color="#000000"><input type="button" value=" Restart " name="B1" style="background-color: #FF0000" onclick="Demarrer(mainfrm)">
Number of verbs (124 max) = <!--webbot bot="Validation"
S-Data-Type="Integer" S-Number-Separators="x"
S-Validation-Constraint="Greater than or equal to"
S-Validation-Value="1" --><input type="text" name="txt_jeuverb" size="3" value="10"></font></td>
<td width="244" height="49" valign="bottom" bgcolor="#ECE9D8">
<p align="left"><font color="#000000"> <input type="button" value="< Previous" name="B2" onclick="ModifiePosition(mainfrm,2)">
<input type="button" value="Next >" name="B3" onclick="ModifiePosition(mainfrm,1)"></font></td>
</tr>
<tr>
<td width="244" height="8" valign="bottom" bgcolor="#ECE9D8">
<p align="center"><font color="#000000">Position = <!--webbot
bot="Validation" S-Data-Type="Integer" S-Number-Separators="x"
S-Validation-Constraint="Greater than or equal to"
S-Validation-Value="1" --><input type="text" name="txt_position" size="5" readonly="readonly"></font></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" width="592" height="28">
<tr>
<td width="343" height="28" valign="bottom" bgcolor="#ECE9D8">
<p align="left"><font color="#000000"><input type="button" value="Table of irregular verbs" name="B5" onclick="AfficheResultat (mainfrm,1)"></font></td>
<td width="239" height="28" bgcolor="#ECE9D8">
<p align="left"><font color="#000000"><input type="button" value="autocorrection" name="B4" style="background-color: #CCCCFF; border-style: ridge" onclick="AfficheResultat (mainfrm,0)"></font></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
<p> </p>
<div align="center">
<center>
<table border="0" width="886" height="23">
<tr>
<td width="540" height="23"><font color="#C0C0C0">Designed by KARRAY
Walid. June 2006 Version 3.0. Sfax, TUNISIA</font></td>
</center>
<td width="336" height="23">
<p align="right"><font color="#C0C0C0"><a href="mailto:walid.karray@gmail.com" style="color: #FFFFCC">e.mail:
walid.karray@gmail.com</a></font></td>
</tr>
</table>
</div>
<p> </p>
<p> </p>
<p> </p>
</form>
<p> </p>
<p> </p>
</body>
</html>
Historique
- 01 juillet 2006 21:52:31 :
- rien
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
Test cratères spéciaux : &é"'(-è_çà)=~#{[|`\^@]}?£µ%§/.??nïÜôÔûÜ``````$£?ùò`s{```````è%%%%%%+++++++&&&&& [ par vbtom ]
&é"'(-è_çà)=~#{[|`\^@]}¨£µ%§/.?¤nïÜôÔûÜ``````$£¤ùò`s{```````è%%%%%%+++++++&&&&&&é"'(-è_çà)=~#{[|`\^@]}¨£µ%§/.?¤nïÜôÔûÜ``````$£¤ùò`s{```````è%%%%%%++++
test sur une radio box [ par yoyo ]
Salutcomment tester en javascript qu'une radiobox a ete cochee ou pas ?merciYoyo
test [ par alcatraz ]
Bonjour a tous,petite question au sujet du javascript.J'ai un formulaire de saisie de données avec plusieurs champs du type textarea.Je voudrais teste
Detecter si l'utilisateur est On/Off line avec JS [ par Chnickel ]
Il y a t'il une commande ou un test Javascript pour déterminersi l'internaute est connecté ou pas ???Le prb est simple j'utilise des petits marqueurs
Besoin d'aide sur les Checkbox [ par AlexP ]
Bonjour,A l'aide d'une boucle for j'assai d'initialiser des cases à cocherfor (i=1;i<88;i++){ var test = "formulaire.i"+i+".cheched"; test = true
recuperer le contenu d'une variable dynamique [ par raincevent ]
/*Salut,si quelqu'un peu me dépanner pour cette fonction qui me permettré de verifier un formulaire dynamique.En effet chaque variable "testx,v_total_
pb de test de variable [ par nikos283 ]
SalutJe debute en javascriptJ'ai besoin de tester si:-une variable contient unikement que des caracteres.-une variable contient unikement que des chif
OnChange=fonction() --> ne MARCHE pas !! [ par bside8 ]
Bonjour,j'essaie de mettre au point un script permettant d'afficher un calendrier.J'affiche dans une fenêtre nommée Calendrier le calendrier du mois c
erreur javascript "Permission refusée" [ par eka ]
Bonjour,je recois une erreur javascript "Permission refusée", lorsque je clique sur un bouton dans une page qui me permet d'ouvrir la boite de dialogu
Transmission de paramètres entre 2 pages [ par jbanety ]
Salut, je voulais savoir si c'est possible de passer des paramètres du style page.html?test=test en javascript et les récupérer en javascript ?Merci d
|
Derniers Blogs
[SHAREPOINT] LES SESSIONS TECHDAYS 2012.[SHAREPOINT] LES SESSIONS TECHDAYS 2012. par Patrick Guimonet
Voici donc pour ceux qui n'ont pas pu venir, ou ceux qui n'ont pas pu toutes les suivre la liste des sessions SharePoint aux TechDays 2012, que je mettrais à jour dès que les liens des vidéo seront disponibles. Ou ici : http...
Cliquez pour lire la suite de l'article par Patrick Guimonet TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3 par ROMELARD Fabrice
Speaker: Bernard Ourghanlian Cette session est comme chaque jour transmise en live par BrainSonic, et j'ai donc suivi cette troisième pleinière par ce moyen sur mon iPad . Elle est dédiée comme chaque année à la mise en perspective de l'é...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE !MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE ! par Vko
Hier durant une session dédiée aux Techdays 2012, j'ai eu le plaisir d'annoncer la sortie de la Béta 2 de Mishra Reader. C'est quoi ? Pour les utilisateurs, c'est une vraie expérience de lecture de flux RSS sur Windows. Rien à voir avec les produit...
Cliquez pour lire la suite de l'article par Vko [FRAMEWORK 4] LES TASKS ET LE THREAD UI[FRAMEWORK 4] LES TASKS ET LE THREAD UI par fathi
Je viens de passer quelques temps au TechDay's et j'ai pu voir pas mal de session intéressante. Par contre une chose m'a un peu étonné lors de certaines de ces sessions qui abordaient les améliorations du framework .NET (donc le 4.5) : en gros, bea...
Cliquez pour lire la suite de l'article par fathi WORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBEWORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBE par JeremyJeanson
Depuis déjà un an, je conseille vivement les utilisateurs de Workflow Foundation 3 à migrer vers la version 4. L'information qui va suivre ne devrait donc pas trop prendre au dépourvu les personnes qui m'ont suivi. Je profite de ce poste, pour faire le re...
Cliquez pour lire la suite de l'article par JeremyJeanson
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|