<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
window.onload=function(){
setInterval(function() {
var baseDate = new Date(),
seconds = baseDate.getSeconds(),
secondsElement = document.getElementsByClassName("seconds")[0];
secondsElement.innerHTML = seconds;
}, 1000);
}
</script>
</head>
<body>
<div class="seconds"></div>
</body>
</html>