html - Change an image without refresh whole page -


i have image control in div. under image showing button change image. on change image replacing last image new image in image folder. previous image , new image path same.

so how show new image without refresh page.

how changing image in folder.

on button click event can this.

you can force browser reload image passing variable so:

 clickfunction()  {  d = new date();  $("#myimg").attr("src", "/myimg.jpg?"+d.gettime());  } 

Comments

Popular posts from this blog

javascript - addthis share facebook and google+ url -

java - Simulate the tossing of a coin three times and print out the percentage of cases in which one gets three tails -

c++ - Class declaration error at explicit keyword -