개발/JavaScript

javascript | textarea text추가

AM0530 2021. 9. 14. 17:59

javascript로 textarea 추가시

var h = document.createElement("textarea");	
h.setAttribute("value", value);
var t = document.createTextNode(value);
h.appendChild(t);

 

 

* 출처 : https://stackoverflow.com/questions/25460533/javascript-createelementtextarea-shows-up-as-object

 

Javascript createElement("TEXTAREA") shows up as [object...]

So I am trying to input a text area in a onMouseOver description for a HTML list. I decided to try the .createElement('TEXTAREA') yet it returns [object HTMLTextAreaElement]. (Also if you could tel...

stackoverflow.com