title: HTML multiple events to trigger the same function
body: <p>Is there a way to have multiple events (<em>e.g. oninput, onblur</em>) trigger exactly the same function in the HTML?</p>
  <p>This is the HTML that I'm trying to simplify:</p>
  <pre><code>&lt;input id=&quot;Email&quot; name=&quot;Email&quot; type=&quot;text&quot; oninput=&quot;toggleSuccessIcon(this, isEmail)&quot; onblur=&quot;toggleSuccessIcon(this, isEmail)&quot;&gt;
  </code></pre>
  <p>I know this is possible in jQuery as explained <a href="https://stackoverflow.com/questions/2534089/jquery-multiple-events-to-trigger-the-same-function">here</a>, but since I have a lot of different inputs (<em>e.g. address, postcode, etc.</em>) that need to call different functions (e.g. <em>toggleSuccessIcon(this, isAddresss), toggleSuccessIcon(this, isPostCode), etc.</em>) I wanted to avoid having a long and messy initialisation in the JavaScript. However, if I am being foolish by doing this in HTML rather than JQuery I'd appreciate an explanation as to the advantage of using JQuery.</p>
  <p>Note that <em>isEmail</em>, <em>isAddress</em>, <em>isPostCode</em>, etc. is a function name.</p>