title: onkeypress event listener not working
body: <p>I have requirement to not to use html event handler. So I am trying to handle it from script . I made a small function but it is not working</p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function lld () {
      document.getElementById('me').onkeypress= myfunction()
  }
  
  function myfunction(){
      alert('hiiiii')
  }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="text" id="me" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>