調(diào)用方法
創(chuàng)新互聯(lián)公司自2013年創(chuàng)立以來,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元坊子做網(wǎng)站,已為上家服務(wù),為坊子各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:028-86922220
2
maxAge : 設(shè)置“年”下拉表中年的個(gè)數(shù),這里設(shè)置為10則顯示最近10年的(前提是你開始“年”必須為今年2013),默認(rèn)值為120。
3
minAge : 與maxAge相對(duì),如果當(dāng)前年為2013年,并且設(shè)置了minAge為20,那么最早可以選擇的年限為1993年。
maxYear : 年列表中最大年,你可用一個(gè)具體年如,'2013-07-06'或者采用變量獲取當(dāng)前年的字符串。
默認(rèn)值為todayYear(算法:todayDate = new Date(), todayYear = todayDate.getFullYear())
futureDates : 將來(未來)時(shí)間是否可以選擇,例如:你在maxYear設(shè)置為'2020',并且futureDates為true,此時(shí)列表內(nèi)容為:
futureDates為false時(shí):
dateFormat:在這里format指的是顯示年月日的順序,bigEndian: “年月日” ,littleEndian:“日月年”,否則 “月日年”
monthFormat:其實(shí)沒有什么大用途,之前因?yàn)槭怯⑽陌姹镜?,short為英文版單詞縮寫。
placeholder: 是否顯示默認(rèn)提示的信息。
defaultDate : 元素初始時(shí)的值
hiddenDate:是否要添加一個(gè)時(shí)間隱藏域,值為true或false 默認(rèn)為true
fieldName:隱藏域元素的name值 默認(rèn)為:birthdate
fieldId:隱藏域元素的id值 默認(rèn)為:birthdate
wraper:為盛放select元素的容器,這個(gè)是我自己擴(kuò)展的,原來插件只支持fieldset,修改后可以有多種方式選擇。效果如下:
"wraper":"span"
legend:fieldset下元素屬性
首先在head之間引入jquery庫(kù)文件和datepicker插件以及相關(guān)css。
script type="text/javascript" src="js/jquery.js"/script
script type="text/javascript" src="js/jquery-ui-datepicker.js"/script
link rel="stylesheet" type="text/css" href="css/jquery-ui.css" /
然后在body間加入一個(gè)輸入框。
input type="text" id="date_1" /
Javscript
調(diào)用datepicker非常簡(jiǎn)單,直接使用以下代碼就可以實(shí)現(xiàn):
$(function(){
$("#date_1").datepicker();
});
這樣,單擊輸入框的時(shí)候會(huì)自動(dòng)彈出一個(gè)日期選擇器,選中日期后,自動(dòng)關(guān)閉選擇器,并在輸入框中顯示選中的日期。
//200多個(gè)插件如下?實(shí)際開發(fā)中?請(qǐng)選擇合適的使用
1:文件上傳類jQuery插件
Ajax?File?Upload.
jQUploader.
Multiple?File?Upload?plugin.
jQuery?File?Style.
Styling?an?input?type?file.
Progress?Bar?Plugin.
2:表單驗(yàn)證類jQuery插件
jQuery?Validation.
Auto?Help.
Simple?jQuery?form?validation.
jQuery?XAV?–?form?validations.
jQuery?AlphaNumeric.
Masked?Input.
TypeWatch?Plugin.
Text?limiter?for?form?fields.
Ajax?Username?Check?with?jQuery.
3:表單選擇框類jQuery插件
jQuery?Combobox.
jQuery?controlled?dependent?(or?Cascadign)?Select?List.
Multiple?Selects.
Select?box?manipulation.
Select?Combo?Plugin.
jQuery?–?LinkedSelect
Auto-populate?multiple?select?boxes.
Choose?Plugin?(Select?Replacement).
4:表單基本、輸入框、選擇框等jQuery插件
jQuery?Form?Plugin.
jQuery-Form.
jLook?Nice?Forms.
jNice.
Ping?Plugin.
Toggle?Form?Text.
ToggleVal.
jQuery?Field?Plugin.
jQuery?Form’n?Field?plugin.
jQuery?Checkbox?manipulation.
jTagging.
jQuery?labelcheck.
Overlabel.
3?state?radio?buttons.
ShiftCheckbox?jQuery?Plugin.
Watermark?Input.
jQuery?Checkbox?(checkboxes?with?imags).
jQuery?SpinButton?Control.
jQuery?Ajax?Form?Builder.
jQuery?Focus?Fields.
jQuery?Time?Entry.
5:時(shí)間、日期和顏色選取類jQuery插件
jQuery?UI?Datepicker.
jQuery?date?picker?plugin.
jQuery?Time?Picker.
Time?Picker.
ClickPick.
TimePicker.
Farbtastic?jQuery?Color?Picker?Plugin.
Color?Picker?by?intelliance.fr.
6:投票類jQuery插件
jQuery?Star?Rating?Plugin.
jQuery?Star?Rater.
Content?rater?with?asp.net,?ajax?and?jQuery.
Half-Star?Rating?Plugin.
7:搜索類jQuery插件
jQuery?Suggest.
jQuery?Autocomplete.
jQuery?Autocomplete?Mod.
jQuery?Autocomplete?by?AjaxDaddy.
jQuery?Autocomplete?Plugin?with?HTML?formatting.
jQuery?Autocompleter.
AutoCompleter?(Tutorial?with?PHPMySQL).
quick?Search?jQuery?Plugin.
8:jQuery編輯器插件
jTagEditor.
WYMeditor.
jQuery?jFrame.
Jeditable?–?edit?in?place?plugin?for?jQuery.
jQuery?editable.
jQuery?Disable?Text?Select?Plugin.
Edit?in?Place?with?Ajax?using?jQuery.
jQuery?Plugin?–?Another?In-Place?Editor.
TableEditor.
tEditable?–?in?place?table?editing?for?jQuery.
9:多媒體、視頻、Flash等類jQuery插件
jMedia?–?accessible?multi-media?embedding.
JBEdit?–?Ajax?online?Video?Editor.
jQuery?MP3?Plugin.
jQuery?Media?Plugin.
jQuery?Flash?Plugin.
Embed?QuickTime.
SVG?Integration.
圖片類jQuery插件
ThickBox.
jQuery?lightBox?plugin.
jQuery?Image?Strip.
jQuery?slideViewer.
jQuery?jqGalScroll?2.0.
jQuery?–?jqGalViewII.
jQuery?–?jqGalViewIII.
jQuery?Photo?Slider.
jQuery?Thumbs?–?easily?create?thumbnails.
jQuery?jQIR?Image?Replacement.
jCarousel?Lite.
jQPanView.
jCarousel.
Interface?Imagebox.
Image?Gallery?using?jQuery,?Interface??Reflactions.
simple?jQuery?Gallery.
jQuery?Gallery?Module.
EO?Gallery.
jQuery?ScrollShow.
jQuery?Cycle?Plugin.
jQuery?Flickr.
jQuery?Lazy?Load?Images?Plugin.
Zoomi?–?Zoomable?Thumbnails.
jQuery?Crop?–?crop?any?image?on?the?fly.
Image?Reflection.
10:Google地圖類jQuery插件應(yīng)用
jQuery?Plugin?googlemaps.
jMaps?jQuery?Maps?Framework.
jQmaps.
jQuery??Google?Maps.
jQuery?Maps?Interface?forr?Google?and?Yahoo?maps.
jQuery?J?Maps?–?by?Tane?Piper.
11:游戲類jQuery插件
Tetris?with?jQuery.
jQuery?Chess.
Mad?Libs?Word?Game.
jQuery?Puzzle.
jQuery?Solar?System?(not?a?game?but?awesome?jQuery?Stuff).
12:表格,網(wǎng)格類jQuery插件
UI/Tablesorter.
jQuery?ingrid.
jQuery?Grid?Plugin.
Table?Filter?–?awesome!.
TableEditor.
jQuery?Tree?Tables.
Expandable?“Detail”?Table?Rows.
Sortable?Table?ColdFusion?Costum?Tag?with?jQuery?UI.
jQuery?Bubble.
TableSorter.
Scrollable?HTML?Table.
jQuery?column?Manager?Plugin.
jQuery?tableHover?Plugin.
jQuery?columnHover?Plugin.
jQuery?Grid.
TableSorter?plugin?for?jQuery.
tEditable?–?in?place?table?editing?for?jQuery.
jQuery?charToTable?Plugin.
jQuery?Grid?Column?Sizing.
jQuery?Grid?Row?Sizing.
13:統(tǒng)計(jì)類jQuery插件
jQuery?Wizard?Plugin?.
jQuery?Chart?Plugin.
Bar?Chart.
14:邊框、圓角、背景類jQuery插件
jQuery?Corner.
jQuery?Curvy?Corner.
Nifty?jQuery?Corner.
Transparent?Corners.
jQuery?Corner?Gallery.
Gradient?Plugin.
14:文字和超鏈接類jQuery插件
jQuery?Spoiler?plugin.
Text?Highlighting.
Disable?Text?Select?Plugin.
jQuery?Newsticker.
Auto?line-height?Plugin.
Textgrad?–?a?text?gradient?plugin.
LinkLook?–?a?link?thumbnail?preview.
pager?jQuery?Plugin.
shortKeys?jQuery?Plugin.
jQuery?Biggerlink.
jQuery?Ajax?Link?Checker.
15:文本提示類jQuery插件
jQuery?Plugin?–?Tooltip.
jTip?–?The?jQuery?Tool?Tip.
clueTip.
BetterTip.
Flash?Tooltips?using?jQuery.
ToolTip.
16:菜單和導(dǎo)航類jQuery插件
jQuery?Tabs?Plugin?–?awesome!?.?[demo?nested?tabs.]
another?jQuery?nested?Tab?Set?example?(based?on?jQuery?Tabs?Plugin).
jQuery?idTabs.
jdMenu?–?Hierarchical?Menu?Plugin?for?jQuery.
jQuery?SuckerFish?Style.
jQuery?Plugin?Treeview.
treeView?Basic.
FastFind?Menu.
Sliding?Menu.
Lava?Lamp?jQuery?Menu.
jQuery?iconDock.
jVariations?Control?Panel.
ContextMenu?plugin.
clickMenu.
CSS?Dock?Menu.
jQuery?Pop-up?Menu?Tutorial.
Sliding?Menu.
17:幻燈片、手風(fēng)琴特效類jQuery插件
jQuery?Plugin?Accordion.
jQuery?Accordion?Plugin?Horizontal?Way.
haccordion?–?a?simple?horizontal?accordion?plugin?for?jQuery.
Horizontal?Accordion?by?portalzine.de.
HoverAccordion.
Accordion?Example?from?fmarcia.info.
jQuery?Accordion?Example.
jQuery?Demo?–?Expandable?Sidebar?Menu.
Sliding?Panels?for?jQuery.
jQuery?ToggleElements.
Coda?Slider.
jCarousel.
Accesible?News?Slider?Plugin.
Showing?and?Hiding?code?Examples.
jQuery?Easing?Plugin.
jQuery?Portlets.
AutoScroll.
Innerfade.
18:拖放類jQuery插件
UI/Draggables.
EasyDrag?jQuery?Plugin.
jQuery?Portlets.
jqDnR?–?drag,?drop?resize.
Drag?Demos.
19:XML?XSL?JSON?Feeds相關(guān)jQuery插件
XSLT?Plugin.
jQuery?Ajax?call?and?result?XML?parsing.
xmlObjectifier?–?Converts?XML?DOM?to?JSON.
jQuery?XSL?Transform.
jQuery?Taconite?–?multiple?Dom?updates.
RSS/ATOM?Feed?Parser?Plugin.
jQuery?Google?Feed?Plugin.
20:瀏覽器
Wresize?–?IE?Resize?event?Fix?Plugin.
jQuery?ifixpng.
jQuery?pngFix.
Link?Scrubber?–?removes?the?dotted?line?onfocus?from?links.
jQuery?Perciformes?–?the?entire?suckerfish?familly?under?one?roof.
Background?Iframe.
QinIE?–?for?proper?display?of?Q?tags?in?IE.
jQuery?Accessibility?Plugin.
jQuery?MouseWheel?Plugin.
21:警告,?提示,?確認(rèn)等對(duì)話框
jQuery?Impromptu.
jQuery?Confirm?Plugin.
jqModal.
SimpleModal.
CSS
jQuery?Style?Switcher.
JSS?–?Javascript?StyleSheets.
jQuery?Rule?–?creation/manipulation?of?CSS?Rules.
jPrintArea.
22:DOM、AJAX和其它JQuery插件
FlyDOM.
jQuery?Dimenion?Plugin.
jQuery?Loggin.
Metadata?–?extract?metadata?from?classes,?attributes,?elements.
Super-tiny?Client-Side?Include?Javascript?jQuery?Plugin.
Undo?Made?Easy?with?Ajax.
JHeartbeat?–?periodically?poll?the?server.
Lazy?Load?Plugin.
Live?Query.
jQuery?Timers.
jQuery?Share?it?–?display?social?bookmarking?icons.
jQuery?serverCookieJar.
jQuery?autoSave.
jQuery?Puffer.
jQuery?iFrame?Plugin.
Cookie?Plugin?for?jQuery.
jQuery?Spy?–?awesome?plugin.
Effect?Delay?Trick.
jQuick?–?a?quick?tag?creator?for?jQuery..
進(jìn)入laydate.js文件,修改config里面的 defSkin ,取值就是skin下面的文件夾的名字。
同理,format、min、max 都是可以修改的!
首先獲取當(dāng)前時(shí)間與目標(biāo)時(shí)間的時(shí)間差,然后通過定時(shí)器更新這個(gè)時(shí)間差,就實(shí)現(xiàn)了倒計(jì)時(shí)效果。