![](/img/trans.png)
[英]How to make the image auto refreshed to get the new render view? Instead of browser cached
[英]How to make the browser display image with same name and not the cached one?
我已經通過在img src標記中添加“ time()”來解決此問題。
但是用Javascript怎么做呢?
這是我的代碼:
th_div_html+= "<img src='"+path_th_img+"' class='shadow2' style='margin:7px;' onclick='imageShow("+z+");'>";
使用PHP比使用JavaScript更好,因此我需要您的幫助。
如何使用javascript在此img標簽中添加類似“ time()”函數的內容?
謝謝
img.src = 'img.jpg?' + Math.random();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.