<!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 date = new Date(); let t = date.getHours() + ":" + date.getMinutes()+ ":" +date.getSeconds()+ ":" +date.getMilliseconds(); $("#test").html(t); }); </script> </head> <body>
</body> </html>