Created
March 10, 2009 18:12
-
-
Save sekimura/77040 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var currHhmm; | |
function refreshClock() { | |
var d = new Date; | |
var hh = d.getHours(); | |
var mm = d.getMinutes(); | |
if (hh < 10) hh = "0" + hh; | |
if (mm < 10) mm = "0" + mm; | |
var hhmm = [hh, mm].join(''); | |
if ( currHhmm !== hhmm) { | |
currHhmm = hhmm; | |
var src = "http://bijint.com/m/img/photo/" + hhmm + ".jpg"; | |
document.getElementById('clock').innerHTML = '<img width="345" height="460" src="' + src + '"/>'; | |
} | |
setTimeout(refreshClock, 1000 * 5); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment