Jquery 绑定时间
jquery 显示本地时间/ 带日期、星期/ UTC
引用jquery 库:<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.jclock.js"></script>
$(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 }) });
});
前台代码:
<div id="demo"></div>
<input type="button" id="local" value="本地时间" />
<input type="button" id="with" value="带日期、星期" />
<input type="button" id="utc" value="UTC" />