Вариант с установкой секунд ... )))
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
body { background-color:#ffcc33; margin:0px; }
div { color:#0033cc; font:bold 12pt Tahoma; margin:15px; }
</style>
<script type="text/javascript">
var t = new Date,f = 1,s,n;
t.setHours(0, 0, 0, 0);
function Timer() {
t = new Date(t.getTime() + f*((new Date).getTime() - s.getTime()));
document.getElementsByTagName("div")[0].innerHTML = t.toLocaleTimeString();
s = new Date;
n = setTimeout(arguments.callee, 500)
}
function New_start() {
window.clearTimeout(n);
t.setHours(0, 0, 0, 0);
s = new Date;
Timer()
}
function Pause() {
s ? (window.clearTimeout(n), s = !1) : (s = new Date, Timer())
};
function BackTimer()
{
window.clearTimeout(n);
f = -f;
s = new Date;
Timer()
}
function Set()
{
var sec = parseInt(document.getElementById("sec").value, 10)||0
t.setHours(0, 0, sec, 0);
document.getElementsByTagName("div")[0].innerHTML = t.toLocaleTimeString();
}
</script>
</head>
<body>
<input type="button" onclick="New_start()" value="Start/New">
<input type="button" onclick="Pause();" value="Pause/Go">
<input type="button" onclick="BackTimer();" value="BackTimer">
<input type="button" onclick="Set();" value="Set">
<label><input type="text" value="30" id="sec">sec</label>
<div>Div HTML</div>
</body>
</html>