Also im Klartext, mal wieder einer, der zu faul ist google zu benutzen und den Code anzupassen.
Aber da ich gerade Langeweile habe:
PHP-Code:
<script type="text/javascript">
// <![CDATA[
var now = new Date()
var hours = 23 - now.getHours()
var minutes = 59 - now.getMinutes()
var seconds = 59 - now.getSeconds()
var interval = null
function countDown() {
if((--seconds) < 0 && (seconds = 59))
if((--minutes) < 0 && (minutes = 59))
if((--hours) < 0)
window.clearInterval(interval)
updateDisplay()
}
function updateDisplay() {
alert(hours.toString()+":"+minutes.toString()+":"+seconds.toString())
}
window.onload = function() {
interval = window.setInterval("countDown()", 1000)
}
// ]]>
</script>