title: How to check string length with JavaScript
body: <p>I want to get the string length when a key is pressed like StackOverflow does.</p>
  
  <p><img src="https://i.stack.imgur.com/JPQHx.png" alt="Example of StackOverflow showing length"></p>
  
  <p>I have tried to do this with <code>onblur</code>, but it's not working.  How do I do this?</p>