download file with url component
HTML
<button id="download">
download file
</button>
JavaScript
function download(filename, text) {
var pom = document.createElement('a');
pom.setAttribute('href', 'https://drive.google.com/file/d/1xVHbFEY-JSoHnPerQG__dQ2SGwTMLmzO/');
pom.setAttribute('download', filename);
pom.click();
}
document.getElementById("download").onclick = function () {
download('test.csv', 'Hello world!');
};