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>