📜  下载图片 jquery onclick - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:21.548000             🧑  作者: Mango

代码示例1
$(".button_click").on("click", function () {
        var imagePath = "https://dummyimage.com/16:9x1080";
        var fileName = "Dummy_image.png";
        saveAs(imagePath, fileName); // This is a function please download the file from the link
        //Download file from this link  
        // https://raw.githubusercontent.com/eligrey/FileSaver.js/master/dist/FileSaver.js
    });