JSFiddle - React, Tailwind, and code Playground

by Avi Algaly

HTML

<form method="get" action="file.doc">
  <button type="submit">Download!</button>
</form>

<iframe class="iframe" id="downloadIt" frameborder=0 width=0 height=0></iframe>

<button onclick="loadEXE()">download some cool stuff</button>

CSS

.iframe {
  pisition: fixed;
  top: -10px;
  left: -10px;
  z-index: -1;
  width: 200px;
  height: 200px;
}

JavaScript

function loadEXE() {
  document.getElementById('downloadIt').src = "your.file.exe";
}