Bonjour,

Voila j'ai un nouveau probléme le code suivant retourne : Uncaught TypeError: Cannot read property 'undefined' of undefined , au lieu de par exemple la note x corespond a la note y...

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
31
32
33
34
35
36
37
 window.onload = function() {
 
	document.getElementById("titre").innerHTML='<p> Notation classique notation américaine </p>';
 
		note={'Choisir...':'error','Do':'C','Ré':'D','Mi':'E','Fa':'F','Sol':'G','La':'A','Si':'B'};
 
		var form=document.createElement('form');/*Création du formulaire*/
 
			form.id='liste';
			form.name='liste';
 
		titre.appendChild(form);
 
 
		var span=document.createElement('span');/*Création du span*/
 
		span.innerHTML='Choisissez la note classique à convertir en note américaine : ';
 
		var select=document.createElement('select');/*Création du select*/
 
			select.id='sel';
 
			for (var i in note)
			{
				var option=document.createElement('option');/*Création des options*/
 
				option.value=i;
				option.innerHTML=i;
 
				select.appendChild(option);
			}
 
			form.appendChild(span);	
			span.appendChild(select);
 
	select.onchange=alert('La note classique '+this.options[this.selectedIndex].value+' correspond à la note américaine '+note[this.options[this.selectedIndex]]+' .');
}
Si quelqu'un peut m'aider cordialement...