i want to append label in my coding i already append textbox and button, but label is not append in my coding
my coding is
<script> var bobj; var i=0; var j; var k=0; function addDetails() {
var newFreeformLabel = document.createElement('label'); newFreeformLabel.innerHTML = 'Omschrijving:'; container.appendChild(newFreeformLabel);
var newdiv = document.createElement('div');//creating div on clicking add name button newdiv.setAttribute('id','ndiv'+i); var nametxtbox = document.createElement('input');// creating the name text box nametxtbox.setAttribute('type','input'); nametxtbox.setAttribute('size','25'); nametxtbox.setAttribute('id','nametxt'+i); nametxtbox.setAttribute('name','name'+i); newdiv.appendChild(nametxtbox);//appending name textbox element to created div
alert('name'+i);
var space = document.createTextNode(" "); newdiv.appendChild(space);
var nametxtbox = document.createElement('input'); nametxtbox.setAttribute('type','input'); nametxtbox.setAttribute('size','4'); nametxtbox.setAttribute('id','nametxt'+i); nametxtbox.setAttribute('nam','nam'+i); nametxtbox.setAttribute('value','nam'+i); newdiv.appendChild(nametxtbox);//appending name textbox element to created div
alert('nam'+i);
var space = document.createTextNode(" "); newdiv.appendChild(space);
var nametxtbox = document.createElement('input'); nametxtbox.setAttribute('type','input'); nametxtbox.setAttribute('size','4'); nametxtbox.setAttribute('id','nametxt'+i); nametxtbox.setAttribute('na','na'+i); nametxtbox.setAttribute('value','na'+i); newdiv.appendChild(nametxtbox);//appending name textbox element to created div
alert('na'+i);
var space = document.createTextNode(" "); newdiv.appendChild(space);
var removebutton = document.createElement('input'); removebutton.setAttribute('type','button'); removebutton.setAttribute('value','Remove'); removebutton.setAttribute('id',i); removebutton.setAttribute('onclick','delDetails(this.id)'); newdiv.appendChild(removebutton);//appending remove button element to the div
bobj = document.getElementById('Layer1');//appending the created element to the div bobj.appendChild(newdiv);//appending the div to the body
function delDetails(icopy)// function to delete the particular div { var newdiv = 'ndiv'+icopy; var dobj = document.getElementById(newdiv); bobj.removeChild(dobj); icopy=i; i--; } </script>