Sunday, June 10, 2012

Tiện ích đếm thời gian Load cho Blogspot





1. Vào phần thiết kế (Design)
2. Chọn thêm tiện ích (Add a Gadget)
3. Thêm 1 HTML/Javascript và thêm vào code bên dưới

<style>
#texttime{
color:#ff0066;
font-size:15px;
}
</style>
<script type="text/javascript">
var startTime=new Date();
function currentTime(){
var a=Math.floor((new Date()-startTime)/100)/10;
if (a%1==0) a+=".0";
document.getElementById("endTime").innerHTML=a;
}
window.onload=function(){
clearTimeout(loopTime);
}
</script>
<script type="text/javascript">
document.write('<span id="texttime">Th&#7901;i gian load trang: <span id="endTime">0.0</span> giây</span> ');
var loopTime=setInterval("currentTime()",100);
</script>

4. Save tiện ích lại
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 nhận xét

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© Sổ ghi chú
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0
Posts RSSComments RSS
Back to top