<html> <head> <body> <title></title> <script language="JavaScript"> function clock() { today=new Date(); hours=today.getHours(); minutes=today.getMinutes(); timevalue= " " + hours; timevalue += ((minutes<10) ? ":0" : ":") + minutes return value=timevalue; } // текущее время timevalue = setInterval('clock()',1000); // передаем переменную timevalue скрипту time.php $.post("time.php", {timevalue: ""+timevalue+""}); </script> </head> </body> </html>
<? //time.php echo $_POST['timevalue']; ?>