Jquery 綁定時(shí)間實(shí)現(xiàn)代碼
更新時(shí)間:2011年05月03日 22:51:29 作者:
jquery 顯示本地時(shí)間/ 帶日期、星期/ UTC,需要的朋友可以參考下。
引用jquery 庫(kù):<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 }) });
});
前臺(tái)代碼:
<div id="demo"></div>
<input type="button" id="local" value="本地時(shí)間" />
<input type="button" id="with" value="帶日期、星期" />
<input type="button" id="utc" value="UTC" />
<script type="text/javascript" src="jquery.jclock.js"></script>
復(fù)制代碼 代碼如下:
$(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 }) });
});
前臺(tái)代碼:
復(fù)制代碼 代碼如下:
<div id="demo"></div>
<input type="button" id="local" value="本地時(shí)間" />
<input type="button" id="with" value="帶日期、星期" />
<input type="button" id="utc" value="UTC" />
相關(guān)文章
jQuery模擬select實(shí)現(xiàn)下拉菜單功能
這篇文章主要介紹了jQuery模擬select實(shí)現(xiàn)下拉菜單功能,比較實(shí)用,需要的朋友可以參考下。2016-06-06
jquery構(gòu)造器的實(shí)現(xiàn)代碼小結(jié)
jQuery的$符號(hào)非常神奇,它可以接受一個(gè)字符,也可以接受一個(gè)文檔對(duì)象或window對(duì)象,亦可以傳個(gè)函數(shù)進(jìn)行變?yōu)閐omReady加載器2011-05-05
jquery 獲取 outerHtml 包含當(dāng)前節(jié)點(diǎn)本身的代碼
jQuery.html() 是獲取當(dāng)前節(jié)點(diǎn)下的html代碼,并不包含當(dāng)前節(jié)點(diǎn)本身的代碼,后來實(shí)驗(yàn)發(fā)現(xiàn)有一個(gè)jQuery的一個(gè)方法可以解決2014-10-10

