title: Javascript onkeydown a function
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function Test(event) {
    console.log(event.key + ' ' + event.which + ' ' + event.code);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" onkeydown="Test(this)"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><b>Result:</b></p>
  
  <pre><code>undefined undefined undefined
  </code></pre>
  
  <p><b>Reason:</b> I use this method because I need to generate multiple input text (dynamic) on run time.</p>
  
  <p><b>Please anyone help me, Thank in advance.</b></p>