+ 1
Value from textarea returns nothing 😱
I tried to get the value from the textarea and write in the div. https://code.sololearn.com/Wk3oLBnDhK2T/?ref=app But it doesn't show anything. How to fix it please
2 Antworten
+ 3
Prasant : The Nothing 😜🙈
It is happening because you are getting textarea value before loading the document. So you need to get value when event occurs.
Write this inside the function
var txt = document.getElementById("txt").value;
var dv = document.getElementById("dv");
See this
https://code.sololearn.com/Whh4UL3C1hIO/?ref=app
+ 2
I Am Groot !
Thank you so much 😊