The source code of the HTML file is as follows:
Copy codeThe Code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<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>
</Head>
<Body>
<Div> </Div>
<Div id = "keleyitime1"> 12:38:20 </div>
<Div id = "keleyitime2"> 23:59:46 </div>
<Div id = "keleyitime3"> 1680/12/31 23:59:47 </div>
<Div id = "keleyitime4"> 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>
</Html>
Usage:
Use the jquery.keleyilcdclock.css file and the jquery. KeleyiLCDClock. js file.
Then define the id of the div, such as keleyitime, and then set the time and use the KeleyiLCDClock () method.
$ ("# Keleyitime"). text (Date ());
$ ("# Keleyitime"). KeleyiLCDClock ();