GIF动态图:

用jquery制作一个动态时钟-LMLPHP

代码:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="js/jquery-3.3.1.js"></script>
</head>

<body>
<div id="div11"></div>
</body>
<script>
    $(function(){
		setInterval(
		            function(){
		                var date = new Date();
		                var s = date.getSeconds();
		                var m = date.getMinutes();
		                var h = date.getHours();
		                $("#div11").text(h+":"+m+":"+s);
		            },

		    1000);



		});
		</script>
</html>
10-27 07:25