好库网
function createlayer()
{
  myselect=document.getElementById("Msgtd");
 //动态创建节点
for (i=0;i<10;i++){
   
     myoption=document.createElement("<div>");
       currenttext = document.createTextNode("dvsvsdv");
	myoption.appendChild(currenttext); 
   myselect.appendChild(myoption);
  myoption.setAttribute("id","message"+i);
 }
}

function setvalue(key)
{
  document.getElementById("inputer").value=key;
}

//动态清除层的节点
function clearChild() {
  
    el=document.getElementById("msg");
    if (el.childNodes) {
      //window.alert(el.childNodes.length); 
      for (var i = el.childNodes.length-1; i>=0 ;i--) {
        var childNode = el.childNodes[i];
        el.removeChild(childNode);
      }
    }
}