Bonjour à tous,
Voilà mon problème, j'ai écrit un script qui génére des opérations arithmétiques dans un grand formulaire généré en javascript :
Si quelqu'un peut me dire comment faire pour récupéré les informations de ce tableau généré.
function gen_grille() {
document.write("<table class='align' border=1>"); // On ouvre le tableau
for ( var i = 0; i<20; i++) {
if ( i == 0 || i == 5 || i == 10 || i == 15 ) document.write("<tr>"); // On ouvre le début de la ligne
document.write("<td>"); // On ouvre la 1ère colonne
gen_operation(i); // On affiche l'opération
document.write("</td>"); // On ferme la colonne
if ( i == 4 || i == 9 || i == 14 || i == 19 ) document.write("</tr>"); // On ferme la ligne
}
document.write("</tr></table>"); // On ferme le tableau
}
function gen_operation(i) {
var I = i++;
document.write("<form name='eao' action='eao.html'><table border=0><tr><td>x</td><td>");
var A = alea(100);
document.write(A);
document.write("<br />");
var B = alea(100);
document.write(B);
document.write("<hr>");
document.write("<input type='text' class='align' size='4' name='res",I,"'/>");
document.write("</td></tr></table></form>");
var Resultat = A * B;
var titre = "Resultat"+i;
ecrireCookie(titre,Resultat);
}
########### EXTRAIT FICHIER HTML #############
<script language="javascript">gen_grille()</script>
<br />
<br />
<div class="bouton">
<input type="button" name="ok" value="Valider" onClick="sauvegarde();OuvrirPopup('correction.html', '', 'resizable=no, location=no, width=400, height=450, menubar=no, status=no, scrollbars=no, menubar=no');" />
</div>
Configuration: Windows Vista
Firefox 2.0.0.11