我正在准备体育设施的预订系统。在预订页面中,我创建了一个日历,并且出现了一些复杂情况。例如,如果用户选择星期六,我希望只显示一定数量的选项。我该怎么做?到目前为止,这是我的代码
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker({
altField: "#alternate",
altFormat: "DD"
});
});`
</script>
<form action="booking.php" method="post">
<tr><td>Sports Facility:</td><td><select name = "sports_facility">
<option name="sport1" value = "Basketball">Basketball</option>
<option name="sport6" value = "Tennis">Tennis Court (Multistorey Carpark)</option></td></tr>
</select>
</table>
<tr><td>Date:</td><td><input type="text" id="datepicker" name="datePicker" /> Day: <input type="text" id="alternate" name="vAlternate" size="8" /></td></tr>
<tr><td>Time:</td><td><select>
<option value="Time 1">9.00am-11.00am</option>
<option value="Time 2">11.00am-1.00pm</option>
<option value="Time 3">1.00pm-3.00pm</option>
<option value="Time 7">9.00pm-11.00pm</option> </select>
</td></tr>
</table>
</form>