jquery.jclock.js js显示当前时间
<html> <head> <title> js显示当前时间的代码分享 </title> </head> <style type="text/css"> * { padding:0; margin:0; } #demo { border:1px solid #ccc; } </style> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.jclock.js"></script> <script type="text/javascript"> $(function(){ $('#demo').jclock(); $('#local').click(function(){$('#demo').jclock()}); $('#with').click(function(){$('#demo').jclock({withDate:true, withWeek:true})}); $('#utc').click(function(){$('#demo').jclock({withDate:true, utc:true})}); }); </script> </head> <body> <h1>demo</h1> <div id="demo"></div> <input type="button" id="local" value="本地时间" /> <input type="button" id="with" value="带日期、星期" /> <input type="button" id="utc" value="UTC" /> </body> </html> |