在js中
window.setInterval(getPic, 100);
function getPic(){$("#img1").attr('src',"${pageContext.request.contextPath}/image/iframe.jpg?time="+(new Date()).getTime());
}
在jsp中
<img id="img1" style="width: 100%;height: 100%" alt="" src="${pageContext.request.contextPath}/image/iframe1.jpg">
在服务器中的iframe.jpg图片会隔100ms改变覆盖,但是在网页上要隔3秒左右才会刷新图片,我明明设的是100ms,并且浏览器也是在100ms发送get请求,