title: Calling href from onclick method does not work
body: <p>Hello i was wondering how can i invoke  an <code>a</code> click from a <code>button</code> <code>onclick</code> event:</p>
  
  <p>I have made it work so far with these 2 methods :</p>
  
  <pre><code>&lt;a class="button" type="application/octet-stream"  href="http://localhost:5300/File" download&gt;Click here for dld&lt;/a&gt;
  
  &lt;input type="button"  onclick="location.href='http://localhost:5300/File';" value="Download"/&gt;
  </code></pre>
  
  <p>But i can not make it work with <code>js</code> ; i have tried like this:</p>
  
  <pre><code> &lt;button  onclick="Save('http://localhost:5300/File')"&gt;Download&lt;/button&gt;
  
   function Save(url){
              var link=document.createElement('a');
              link.url=url;
              link.name="Download";
              link.type="application/octet-stream";
              document.body.append(link);
              link.click();
              document.body.removeChild(link);
              delete link;
          }
  </code></pre>
  
  <p><strong>P.S</strong> I need to use the <code>&lt;button&gt;&lt;/button&gt;</code> and not the <code>input</code> !</p>