Bonjour, j'ai un problème d'execution de code javascript sur Internet Explorer
j'ai développé ce code avec le DOM,
il rajoute une ligne dans un tableau avec l'id tableCartes : un tr contenant un td qui lui meme contient un input texte
il fonctionne sous Firefox mais pas sous IE.
Si quelqu'un peux m'aider à le rendre compatible avec ce navigateur.
Merci d'avance


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  var n = document.forms[2].elements.length -10;
	var tableCarte = document.getElementById("tableCartes");
	var nouveauInputCarte = document.createElement('input');
	var nouveauTr = document.createElement('tr');
	var nouveauTdCarte= document.createElement('td');
	var nouveauTdLabelCarte = document.createElement('td');
 
	nouveauInputCarte.name = 'carteSup' + n; 
	nouveauInputCarte.type = 'text';
	nouveauInputCarte.id = 'carteSup' + n;
 
 
	nouveauTdLabelCarte.width='10';
	nouveauTdLabelCarte.align='left';
	nouveauTdLabelCarte.setAttribute("class","label_form");
	nouveauTdLabelCarte.setAttribute("className","label_form");
 
	nouveauTdCarte.width='195';
        nouveauTdCarte.align='left';
 
	var textNode = document.createTextNode('N°');
 
 
	nouveauTdLabelCarte.appendChild(textNode);
	nouveauTdCarte.appendChild(nouveauInputCarte);
 
	nouveauTr.appendChild(nouveauTdLabelCarte);
	nouveauTr.appendChild(nouveauTdCarte);
 
	tableCarte.appendChild(nouveauTr);