
» Bắt đầu thủ thuật
1. Đăng nhập tài khoản Blogger
2. Vào phần thiết kế (hay bố cục)
3. Chọn thêm tiện ích (Add a Gadget)
4. Thêm 1 HTML/Javascript và chèn vào nó code bên dưới
<script language="JavaScript">
var countDownInterval=30; //thời gian refresh page
//configure width of displayed text, in px (applicable only in NS4)
var c_reloadwidth=200
</script>
<ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer></ilayer>
<script>
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location.reload()
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){
document.c_reload.document.c_reload2.document.write('Website sẽ tự động <a href="javascript:window.location.reload()">refresh</a> trong <b id="countDownText">'+countDownTime+' </b> giây')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}
function startit(){
if (document.all||document.getElementById)
document.write('Website sẽ tự động <a href="javascript:window.location.reload()">refresh</a> trong <b id="countDownText">'+countDownTime+' </b> giây')
countDown()
}
if (document.all||document.getElementById)
startit()
else
window.onload=startit
</script>
var countDownInterval=30; //thời gian refresh page
//configure width of displayed text, in px (applicable only in NS4)
var c_reloadwidth=200
</script>
<ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer></ilayer>
<script>
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location.reload()
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){
document.c_reload.document.c_reload2.document.write('Website sẽ tự động <a href="javascript:window.location.reload()">refresh</a> trong <b id="countDownText">'+countDownTime+' </b> giây')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}
function startit(){
if (document.all||document.getElementById)
document.write('Website sẽ tự động <a href="javascript:window.location.reload()">refresh</a> trong <b id="countDownText">'+countDownTime+' </b> giây')
countDown()
}
if (document.all||document.getElementById)
startit()
else
window.onload=startit
</script>
5. Save tiện ích lại
Chúc bạn thành công
Địa chỉ bài viết: http://www.traidatmui.com/2011/04/tien-ich-tu-ong-refresh-cho-blogspot.html#ixzz1OT40IN4V
Nguồn: TRAIDATMUI.com
Không có nhận xét nào:
Đăng nhận xét