title: VB.Net How to download url in javascript?
body: <p>How to get currrent link in javascript or after click to download button.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  Dim HtmlColl As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("button")
          For Each elem As HtmlElement In HtmlColl
              If elem.GetAttribute("id").Equals("downloadbtn") Then
                  elem.InvokeMember("click")
              End If
          Next</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>web source:</strong>
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>http://xsitex.com/lrqpbs6uyca0/url_javascr.jpg.html
  
  &lt;div class="download-button-block"&gt;
      &lt;div class="clear"&gt;&lt;/div&gt;
       &lt;button id="downloadbtn" class="green-button"&gt;
        &lt;span class="btext"&gt;Download file&lt;/span&gt;
       &lt;/button&gt;
     &lt;/div&gt; &lt;!--end right column--&gt;
    &lt;/form&gt;
  
  &lt;br&gt;&lt;center&gt;
  &lt;script type="text/javascript"&gt;&lt;!--&lt;![CDATA[
  /* PLACEMENT: Setup.xsitex.com.xsitex.com_980x250 */
  if(location.protocol.substr(0,4)=='http')document.write(unescape('%3C')+'script id="Setup.xsitex.com.xsitex.com_980x250" src="'+location.protocol+'//lv.adocean.pl/_'+(new Date()).getTime()+'/ad.js?id=SwaXpdclN776PUuiIkkTHSZPXg_FnPrrh06YBtN1u8X.M7/x='+screen.width+'/y='+screen.height+'" type="text/javascript"'+unescape('%3E%3C')+'/script'+unescape('%3E'));
  //]]&gt;--&gt;&lt;/script&gt;
  &lt;/center&gt;</code></pre>
  </div>
  </div>
  </p>