title: HTML Button Close Window
body: <p>I have an html button that I want to close the current window when clicked.  I thought I could just set the onclick feature like I did below.  Am I missing something?</p>
  
  <pre><code>&lt;button type="button" onclick="javascript:window.close()"&gt;Discard&lt;/button&gt;
  </code></pre>