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
>
转载于:https://www.cnblogs.com/jikey/archive/2009/12/10/1621302.html