0
我有這個下面的HTML代碼使用jQuery得到刷新,但它不顯示在鉻瀏覽器中的新形象。如何自動刷新圖像以獲取新的渲染視圖?而不是瀏覽器緩存
For example: 12.00AM - RED CAR driving
<div class="mycam_local">
<img src="http://192.168.0.181:8008/liveimage/now.jpeg?1370446579000">
</div>
For example: 04.00AM - still RED CAR (basically its yellow one)
<div class="mycam_local">
<img src="http://192.168.0.181:8008/liveimage/now.jpeg?1350446549000">
</div>
編輯
$('.my_camera_brightness_up').live("click", function() {
if (myb>1) {
myb=1;
} else {
myb=myb+0.01;
}
$.ajax({
type : "GET",//POST
dataType: 'json',
url : '/a/c',
data : url + '&command=brightness;'+myb.toFixed(2),
async : true,
beforeSend: function()
{
},
complete: function()
{
},
success : function(msg)
{
$('.my_camera_buttonstate').html("Updated: " + myb.toFixed(2));
var xy= "<img src=\"http://" + msg.extra.remoteip + ":7007/video/now.jpeg?"+ Date.parse(new Date().toString()) + "\" />";
//$('.mycam_local').find('img').attr('src', 'http://' + msg.extra.remoteip + ':7007/video/now.jpeg' +"?"+ Date.parse(new Date().toString()));
alert(xy);
$('.mycam_lcoal').html(xy);
}
});
});
你的意思是你得到一個空白圖像或靜止老
見一?順便說一句,代碼刷新圖像在哪裏? –
所以你想讓圖像在設定的時間自動刷新?像30秒,1分鐘等? –
@roasted:我總是得到舊的。 – YumYumYum