title: How to pass parameter to the attachEvent Javascript function
body: <p>I have to pass a parameter the <code>validateNum</code> Javascript function (e.g. num1, num2)</p>
  <pre><code>if (num1.attachEvent) {
   num1.attachEvent(&quot;onkeypress&quot;, validateNum);  
  }
  </code></pre>
  <p>How to pass? Can I get a code sample?</p>