title: Detecting "value" of input text field after a keydown event in the text field?
body: <p>My site has an input box, which has a <code>onkeydown</code> event that merely alerts the value of the input box.</p>
  <p>Unfortunately the value of the input does not include the changes due to the key being pressed.</p>
  <p>For example for this input box:</p>
  <pre><code>&lt;input onkeydown=&quot;alert(this.value)&quot; type=&quot;text&quot; value=&quot;cow&quot; /&gt;
  </code></pre>
  <p>The default value is &quot;cow&quot;. When you press the key <kbd>s</kbd> in the input, you get an <code>alert(&quot;cow&quot;)</code> instead of an <code>alert(&quot;cows&quot;)</code>. How can I make it <code>alert(&quot;cows&quot;)</code> <strong>without using <code>onkeyup</code></strong>? I don't want to use <code>onkeyup</code> because it feels less responsive.</p>
  <p>One partial solution is to detect the key pressed and then append it to the input's value, but this doesn't work in all cases such as if you have the text in the input highlighted and then you press a key.</p>
  <p>Anyone have a complete solution to this problem?</p>