Gambar berganti setiap hari

Dengan JavaScript ini, gambar akan berganti setiap hari.



Demo :



Cara membuatnya

Dari Dashboard >> Design >> Edit HTML.

Penempatannya
dibawah <body>
........
diatas </body>


<script type='text/javascript'>
//<![CDATA[

//JavaScript Kit (http://www.javascriptkit.com/script/cut120.shtml)

//Tempat Gambar anda :
var mondayimg="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8u8wxWvHiUNB4s_KET-UHvf6QN4VNVOT7ftiBoKVTs4uarW9Nm5APmu7b0Je6Nwp4ibUn3fhoGEJHWhu9v6Ngy1Ej3DRe4rMBvWm_vuzt2UTHoL8Kyq5wu6oRX1utTlpnE7OvvYEHcvNm/s104/1.gif"
var tuesdayimg="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2DY4FlGtBff_JGFocmLA5AM8f3_ro0RNZo3w2oHB6q-67g2WgKy5rM2wrStK21xp9PloacPoP9NdeQ8RqhvtGvWmDOuCoZBZSfSs-Lh60R06rBlw4g_vOcUQgArGEBkCLUOWsHvYj8Aa5/s104/2.gif"
var wednesdayimg="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU-yTSwBZv4u764B8QPeqFol5aIhaFbAP_WCqcWfx3CAZDl7mAiMNmYQTnql_1d3QQpDSiExNg09uOa2rk3kly7EvdMz7Ry97xWPnGP5odybn8_higIioO2QSfRofPxbX1JYTbs0uzwzVJ/s104/3.gif"
var thursdayimg="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEina154UEAhjTv5Gn5gEG2CKw76C5JQY4k-ihqC1MsMOTreyvT9Nx-466xT6f0-tupcYqHnw4UUs64V1IXrosHQXIQmWislwI4tg2ypnjZK0E1upS61U4r8DwKBkwP_rqpbIOwW29XxghGI/s104/4.gif"
var fridayimg="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVVmgFSeoyib8KxH73bzYG1pOvkHFFpLlSL4fBnmXYObFGqubo0PYkoaTJfELXaUIzcnQSpn3lfYdioc8ld7YwNJQj-6wVFQJ6WCuQdcYlGtvCBl2UDjBq1fALNHECjpaXYigRielRyPgN/s104/5.gif"
var saturdayimg="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjITH3mnNw4JUrdF2OSfp4Df9gWNO9twf1YcTVLRjhxAFCLWYM3ubg2bR8KssY_NY9MY1JXi1P3JaEIrO2pXWDDp2l2S8acBXrlcNHp6PyjWFaehA4Ca4Vl5_12cJfi11fYwsYw4C3_eMsj/s104/6.gif"
var sundayimg="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfmfnA3VWu3b6J_fsae2TTtbvQdAxedQj8K3bhHLCrIEJlaSsWFCnuOYO4mCR5djYMTRxAYb3utIKmnQv45_a4QNN9_KLNrQ8IlNdguuJp4kJkYTfGqzgn5E34QjBDo8jch8UPlKLUpgMV/s104/7.gif"
var mydate=new Date()
var today=mydate.getDay()
if (today==1)
document.write('<img src="'+mondayimg+'">')
else if (today==2)
document.write('<img src="'+tuesdayimg+'">')
else if (today==3)
document.write('<img src="'+wednesdayimg+'">')
else if (today==4)
document.write('<img src="'+thursdayimg+'">')
else if (today==5)
document.write('<img src="'+fridayimg+'">>')
else if (today==6)
document.write('<img src="'+saturdayimg+'">')
else
document.write('<img src="'+sundayimg+'">')

//]]>
</script>



Credit : JavaScript Kit

Alhamdulillah

0 comments:


Posting Komentar


Creative Commons License
Gambar berganti setiap hari by Nano Yulianto is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at http://nanoyulianto.blogspot.com/2011/01/gambar-berganti-setiap-hari.html.
Permissions beyond the scope of this license may be available at http://nanoyulianto.blogspot.com/.