lundi 5 décembre 2016

How to return random picture via jquery

I want to get random picture from http://ift.tt/2h1phui.So I have a button to click to get one.But it only return the same image when I click the button.Here is my partly code: $(".btn").css("background-image",'url(' +"http://ift.tt/2h1phui" + ')');

I don't know why it do not return random picture,what is wrong with my code?How can I get random pic when I click the button?




Aucun commentaire:

Enregistrer un commentaire