Estoy intentando crear un área de texto en un div con el id de "cuerpo". Llamo a la función con un evento onClick, pero cuando hago clic en él, todo lo que se crea es [objeto HTMLTextAreaElement]. No estoy muy seguro de cómo hacer que esto funcione.creando un área de texto con javascript
function opentextarea() {
var input = document.createElement('TEXTAREA');
input.setAttribute('name', 'post');
input.setAttribute('maxlength', 5000);
input.setAttribute('cols',80);
input.setAttribute('rows', 40);
var button = document.createElement('BUTTON');
document.getElementById("body").innerHTML=input, button;
}
¡Funcionó como un amuleto, gracias! – vacarsu