我正在嘗試jquery datepicker,但無法讓它工作。我知道我必須錯過簡單的東西。這裏是我的代碼:jquery - datepicker不工作
HTML:
<div class="demo">
<p>Date: <input type="text" id="datepicker"></p>
</div><!-- End demo -->
<div class="demo-description" style="display: none; ">
<p>The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a sma ll overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as t he input's value.</p>
</div><!-- End demo-description -->
JS:
$(function() {
$("#datepicker").datepicker();
});
這使得文本字段,但沒有jQuery的日曆。謝謝。
非常感謝!這工作。剩下的唯一問題就是日曆現在有一個與它下面的字段重疊的清晰背景,使日曆無法讀取。有沒有辦法指定這個背景顏色? – zallarak 2012-01-02 05:42:56
嘗試添加他們的CSS,你應該嘗試jQuery主題選擇器,它有一些很酷的主題。下載你喜歡的一個,並將它們包含在你的html中。鏈接在這裏:http://jqueryui.com/themeroller/ - >在左側窗格中,轉到galary,選擇一個並下載 – 2012-01-02 05:50:09