动态添加textarea值

  
    
window.onload = function (){
var opinput = document.createElement( ' textarea ' );
opinput.setAttribute(
' id ' , ' aa ' );
var a = document.getElementById( ' a ' );
a.appendChild(opinput);
var i = document.getElementById( ' aa ' );
i.innerHTML
= ' ddd ' ;
}

 

 

   
     
< div id ="a" ></ div >

 

你可能感兴趣的:(textarea)