The following are the HTML file source code:
Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title>jquery Analog LCD Clock </title>
<script type= "Text/javascript" src= "Http://keleyi.com/keleyi/pmedia/jquery/jquery-1.11.0.min.js" ></ Script>
<link rel= "Stylesheet" type= "Text/css" href= "Http://keleyi.com/keleyi/phtml/jqtexiao/24/jquery". Keleyilcdclock.css "/>
<style type= "Text/css" >
div{margin-bottom:10px}
</style>
<body>
<div></div>
<div id= "keleyitime1" >2014/4/24 12:38:20</div>
<div id= "Keleyitime2" >2000/1/1 23:59:46</div>
<div id= "Keleyitime3" >1680/12/31 23:59:47</div>
<div id= "Keleyitime4" >2011/3/26 20:18:12</div>
<script type= "Text/javascript" src= "Http://keleyi.com/keleyi/phtml/jqtexiao/24/jquery". Keleyilcdclock.js "></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("#ke" + "Leyitime4"). Text (Date ());
$ ("#kele" + "yitime1"). Keleyilcdclock ();
$ ("#keley" + "itime2"). Keleyilcdclock ();
$ ("#kel" + "Eyitime3"). Keleyilcdclock ();
$ ("#k" + "Eleyitime4"). Keleyilcdclock ();
});
</script>
</body>
Use:
Reference jquery. keleyilcdclock.css files and jquery.KeleyiLCDClock.js files.
Then define the div ID, such as Keleyitime, then set the time and use the Keleyilcdclock () method.
$ ("#keleyitime"). Text (Date ());
$ ("#keleyitime"). Keleyilcdclock ();