<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$( "<div id='test'></div>" ).appendTo( "body" );
let ms = 0;
setInterval(function() {
let date = new Date();
let t = date.getHours() + ":" + date.getMinutes()+ ":" +date.getSeconds()+ ":" +date.getMilliseconds();
$("#test").html(t);
ms = 1000;
}, ms);
});
</script>
</head>
<body>
</body>
</html>
|