title: Creating input with onkeypress with jQuery?
body: <p>I am trying to create a input element with a expected html output of this:</p>
  
  <pre><code>&lt;input 
    type="text" 
    maxlength="13" 
    value="DD/MM/YY 00:00.0" 
    onkeypress="dateTime()"
  &gt;
  </code></pre>
  
  <p>I tried doing this with the following jQuery code</p>
  
  <pre><code>var input = $("&lt;input&gt;",
    {
      name : newName,
      maxlength : newSize,
      size : newSize,
      type : 'text',
      value : newVal,
      onkeypress : dateTime()
    });
  </code></pre>
  
  <p>But I don't get the expected output</p>
  
  <pre><code>&lt;input type="text" maxlength="13" value="DD/MM/YY 00:00.0"&gt;
  </code></pre>
  
  <p><strong>Question 1 : what is the description of this code, because I cannot for the life of me find anything in the jQuery documentation about this stuff (link would be appreciated).</strong></p>
  
  <p><strong>Question 2 : what is the correct parameter to use to get my expected html result?</strong></p>