Hai teman :p
ketemu lagi nih sama ane
kali ini ane mau mbahas tentang Cara Menampilkan Waktu Loading di Blog
ini dia screenshot nya :
ketemu lagi nih sama ane
kali ini ane mau mbahas tentang Cara Menampilkan Waktu Loading di Blog
ini dia screenshot nya :
pengen tau caranya ?? :p
haha pertama , silahkan masuk ke Dasbor Blogger , jangan masuk Neraka :D
klik "Tambahkan Gadget"
lalu akan keluar menu Pop-Up , pilih HTML/JAVASCRIPT
LALU pastekan kode berikut ini :
<div id="load-time">Calculating Loading halaman...</div>
<script type="text/javascript">
var showTime = document.getElementById('load-time'),
startTime = (new Date()).getTime(); // Get the time before `window.onload`
window.onload = function() {
// Get the current time in `window.onload`
var endTime = (new Date()).getTime();
// Now use the `startTime` and `endTime` to calculate the seconds
// And show the result inside `#load-time`
showTime.innerHTML = "Loading halaman = " + ((endTime-startTime)/1000) + " detik.";
};
</script>
<script type="text/javascript">
var showTime = document.getElementById('load-time'),
startTime = (new Date()).getTime(); // Get the time before `window.onload`
window.onload = function() {
// Get the current time in `window.onload`
var endTime = (new Date()).getTime();
// Now use the `startTime` and `endTime` to calculate the seconds
// And show the result inside `#load-time`
showTime.innerHTML = "Loading halaman = " + ((endTime-startTime)/1000) + " detik.";
};
</script>
Jeng jeng :v
jadi deh ...




0 komentar:
Posting Komentar