Javascript examples for DOM HTML Element:Textarea
Get offset of how much textarea is scrolled
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* www. j a v a2 s .c o m*/ document.getElementById("b").onclick = function() { console.log(document.getElementById("t").scrollTop); }; } </script> </head> <body> <textarea id="t" rows="10" cols="10"></textarea> <button id="b">scrollTop</button> </body> </html>