<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Current Time</title>
<script>
function updateTime() {
var now = new Date();
var hours = now.getHours().toString().padStart(2, '0');
var minutes = now.getMinutes Digital Marketing ().toString().padStart(2, '0');
var seconds = now.getSeconds().toString().padStart(2, '0');
document.getElementById('current-time').innerText = hours + ':' + minutes + ':' + seconds;

setInterval(updateTime, 1000);
</script>
</head>
<body onload="updateTime()">
<h2>Current time:</h2>
<h3 id="current-time"></h3>
</body>
</html>
In this example, the JavaScript setInterval() function calls the updateTime() function once a on the page.