download.html (481B)
1 <html> 2 <head> 3 <meta charset="utf-8" /> 4 </head> 5 <body> 6 <script> 7 const blob = new Blob(["Downloaded Data"], { type: "text/plain" }); 8 const element = document.createElement("a"); 9 const uri = URL.createObjectURL(blob); 10 element.href = uri; 11 element.download = "download.txt"; 12 element.style.display = "none"; 13 document.body.appendChild(element); 14 element.click(); 15 URL.revokeObjectURL(uri); 16 </script> 17 </body> 18 </html>