Please help me redo it so that the input is not "alive" (that is, it does not show the number of words IMMEDIATELY, but only after pressing the button). http://pastebin.com/BR2CUJT2
<html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <textarea name="m" cols="48" rows="5" onKeyDown="textCounter(this)" onKeyUp="textCounter(this)"></textarea> <input type="text" id="counter" value="0"> <script type="text/javascript"> function textCounter(el) { document.getElementById("counter").value = el.value.split(" ").length } </script> <br> <button onclick="calc()">Поиск</button> </body> </html>