tai,
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body> <span id="doc_time">19:59:58</span>
<script type="text/javascript">
function startSecund() {
var doc_time = document.getElementById("doc_time");
var time_sec = doc_time.innerHTML;
var arr_sec = time_sec.split(":");
var h_sec = +arr_sec[0];
var m_sec = +arr_sec[1];
var s_sec = +arr_sec[2];
s_sec++ ;
if (s_sec == 60) { s_sec = 0; m_sec++};
if (m_sec == 60) {m_sec = 0;h_sec++};
if (h_sec == 24) { h_sec=0}
if (h_sec < 10) h_sec = "0" + h_sec;
if (m_sec < 10) m_sec = "0" + m_sec;
if (s_sec < 10) s_sec = "0" + s_sec;
document.getElementById("doc_time").innerHTML = h_sec+":"+m_sec+":"+s_sec;
setTimeout(startSecund, 1000);
}
startSecund()
</script>
</body>
</html>