Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

download image jquery onclick

$(".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
    });
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to authenticate token in react using axios 
Javascript :: JavaScript - How to get the extension of a filename 
Javascript :: reload page 
Javascript :: nodejs execute every minute 
Javascript :: get input value in react using hooks 
Javascript :: how to copy text in the clipboard in js 
Javascript :: js make value positive 
Javascript :: credit card mask js 
Javascript :: ERR_REQUIRE_ESM 
Javascript :: javascript scroll event 
Javascript :: what is sus imposter 
Javascript :: express get form x-www-form-urlencoded 
Javascript :: javascript get json keys 
Javascript :: how to change css with js 
Javascript :: javascript show localstorage size 
Javascript :: check if object values are empty 
Javascript :: create a category discord.js 
Javascript :: npm react-native-async-storage 
Javascript :: asp.net core 3.1 convert system.string[] to javascript array 
Javascript :: discord js how to mention bot 
Javascript :: samesite cookie nodejs 
Javascript :: how to find the last item in a javascript object 
Javascript :: express start template 
Javascript :: get last in array javascript 
Javascript :: vue watch immediate 
Javascript :: get current date 
Javascript :: how to check if a message has an attachment discord js 
Javascript :: jquery on load 
Javascript :: how to find length of array js 
Javascript :: jquery word count 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =