title: How to use onClick ONLY if email input field is valid?
body: <p>Here's code:
  </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input id="subscribe-email" type="email" placeholder="john.doe@example.com" /&gt;
              &lt;button type="submit" id="subscribe-submit" onClick="javascript:omgemailgone();" /&gt;
  </code></pre>
  
  <p>How do I check and run JS function only if email is valid (validation by user-agent, no additional validations)?</p>
  
  <p>UPDATE.
  New browsers can validate input=email by themselves, also there are pseudo classes :valid and :invalid. I need to run function only if browser 'knows' that email is valid.</p>