<html><head><style>.clock_container{ width:100px; text-align:center; background:#000000; border:4px solid #ff0000; padding:2px; }.cw{ color:#ffff00; font-weight:bold; }.pr{padding-right:2px;}</style><script language="javascript">function simple_clock(){ourDate = new Date();var seconds=ourDate.getSeconds();seconds=seconds+"";if(seconds.length==1){seconds="0"+seconds;}var minutes=ourDate.getMinutes();minutes=minutes+"";if(minutes.length==1){minutes="0"+minutes;}var hours=ourDate.getHours()document.getElementById("hours").innerHTML=hours;document.getElementById("min").innerHTML=minutes;document.getElementById("sec").innerHTML=seconds;}setInterval("simple_clock()",500);</script></head><body><div class="clock_container"> <span id="hours" class="cw pr"></span> <span class="cw">:</span> <span id="min" class="cw pr"></span> <span class="cw">:</span> <span id="sec" class="cw"></span></div></body></html>
<html> <head> <style> .clock_container { width:100px; text-align:center; background:#000000; border:4px solid #ff0000; padding:2px; } .cw { color:#ffff00; font-weight:bold; } .pr{padding-right:2px;} </style> <script> function createRequest() { var xmlhttp = false; try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}catch(E){xmlhttp = false;}} if(!xmlhttp && typeof XMLHttpRequest!='undefined'){try{xmlhttp = new XMLHttpRequest();}catch(e){xmlhttp=false;}} if(!xmlhttp && window.createRequest){try{xmlhttp = window.createRequest();}catch(e){xmlhttp=false;}} return xmlhttp; } function request_time() { var url = "get_time.php"; var con=createRequest(); con.open("GET",url,true); con.onreadystatechange=function() { if(con.readyState==4 && con.status==200) { temp = con.responseText.split(","); document.getElementById("hours").innerHTML=temp[0]; document.getElementById("min").innerHTML=temp[1]; document.getElementById("sec").innerHTML=temp[2]; } } con.send(null); } </script> </head> <body onload="setInterval('request_time()',1000)"> <div class="clock_container"> <span id="hours" class="cw pr"></span> <span class="cw">:</span> <span id="min" class="cw pr"></span> <span class="cw">:</span> <span id="sec" class="cw"></span> </div> </body> </html>
<?php$date=date("h");$date.=",".date("i");$date.=",".date("s");echo $date;?>