Javascript examples for DOM HTML Element:Textarea
Detect a string typed in textarea via its onkeyup event
<html> <head> <script type="text/javascript"> var oldText = ''; function checkText(text)//from w w w . j a va2 s . c o m { if(text.length >= 1) { if(text == '<svg>' && text != oldText) { console.log("<svg> found"); } } oldText = text; } </script> </head> <body> <textarea onkeyup="checkText(this.value);"></textarea> </body> </html>