设置img的src,加入时间戳。
var timestamp = Date.parse(new Date());//获取时间戳
$("#photoUrl").attr("src","http://www.hiknow.com/user_photo/164086.jpg?t="+timestamp);
or:
document.getElementById("#photoUrl").src ="http://www.hiknow.com/user_photo/164086.jpg?t="+timestamp";
转载于:https://blog.51cto.com/fengxubb/724188