ptolemy
18-12-2008, 09:57
Mình dùng đoạn code dưới đây để refresh trang web sau thời gian 30 s, nhưng mối lần Refressh lại hiển thị thông báo: The page cannot be refresh without resendind the infomation.
Click Retry to send the infomation again or click Cancel to return to the page that were trying to view
Mình nghĩ do có lấy dữ liệu từ trang trước nên nó hỏi như vậy. Vậy làm thế nào để không hiển thị thông báo trên.
var limit=’’0:30’’: Đó là số phút:giây sẽ refresh lại.
<script>
<!--
var limit=’’0:30’’
if (document.images){
var parselimit=limit.split(’’:’’)
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=’’Tu dong cap nhat sau ’’+curmin+’’ phut va ’’+cursec+’’ giay.’’
else
curtime=’’Tu dong cap nhat sau ’’+cursec+’’ giay.’’
window.status=curtime
setTimeout(’’beginrefresh()’’,1000)
}
}
window.onload=beginrefresh
//-->
</script>
Click Retry to send the infomation again or click Cancel to return to the page that were trying to view
Mình nghĩ do có lấy dữ liệu từ trang trước nên nó hỏi như vậy. Vậy làm thế nào để không hiển thị thông báo trên.
var limit=’’0:30’’: Đó là số phút:giây sẽ refresh lại.
<script>
<!--
var limit=’’0:30’’
if (document.images){
var parselimit=limit.split(’’:’’)
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=’’Tu dong cap nhat sau ’’+curmin+’’ phut va ’’+cursec+’’ giay.’’
else
curtime=’’Tu dong cap nhat sau ’’+cursec+’’ giay.’’
window.status=curtime
setTimeout(’’beginrefresh()’’,1000)
}
}
window.onload=beginrefresh
//-->
</script>