How to get textarea value with with onkeydown/keydown event in JavaScript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to get textarea value with with onkeydown/keydown event in JavaScript?

When I trying with these code below it can't return the last value of the textarea element: var testarea = document.getElem......... document.onkeydown = function(){ testarea.value; }

25th Dec 2021, 9:27 AM
Romjan Ali
Romjan Ali - avatar
1 Answer
0
because it just says testarea.value with no other context
26th Dec 2021, 12:05 AM
ITDW