I'm downloading html file with the content of a div. It's working perfectly but only issue is that it's downloading file in downloads folder instead i want it to download in the folder where project exists.
Here is the code of download function:
function download(){
var a = document.body.appendChild(
document.createElement("a")
);
a.download = "design.html";
a.href = "data:text/html," + document.getElementById("editor").innerHTML;
a.click();
}
Aucun commentaire:
Enregistrer un commentaire