我想使用Jquery UI timepicker,但是當我點擊文本框時,timepicker不顯示。我想知道的是,我是否包含了此類插件的所有要求,並且是時間選擇器的功能是否正確?我無法讓Jquery UI timepicker插件工作
下面是代碼:
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Create a Session</title>
<link rel="stylesheet" type="text/css" href="MyStyles.css">
<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>
<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery.ui.timepicker.css"/>
<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-1.8.14.custom.css"/>
<script type="text/javascript" src="jquery/jquery.ui.timepicker.js"></script>
<script type="text/javascript">
$(function() {
$("#timepicker").timepicker();
});
</script>
</head>
<body>
<form action="create_session.php" method="post" name="sessionform">
<p><strong>5: Time:</strong><input type="text" id=""></p>
</form>
</body>
我是個白癡!我完全忘了我從ID中刪除了「timepicker」。我不記得爲什麼我這麼做,但這讓我的問題看起來很愚蠢,因爲這是一個明顯的原因,爲什麼它不工作,我只是沒有看到它。謝謝:) – BruceyBandit
@ user1050384,請不要忘記標記爲答案,如果它解決了您的問題。 – Gabe