Je pense que tout est dans le titre.

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
function addnode(el,champs,value){
	var childEl_c=document.createElement("div");
	el.appendChild(childEl_c);
	childEl_c.className='item';
	var childEl_ch=document.createElement("span");
	childEl_c.appendChild(childEl_ch);
	childEl_ch.className='champs';
	var childEl_v=document.createElement("span");
	childEl_c.appendChild(childEl_v);
	childEl_v.className='value';
	var txtNode=document.createTextNode(champs + " : ");
	childEl_ch.appendChild(txtNode);
	var txtNode=document.createTextNode(value);
	childEl_v.appendChild(txtNode);
}