大家好,我在使用 jquery ui datepicker onSelect 事件时遇到语法问题。这是我的代码:
$(document).ready(function () {
$('.datePicker').datepicker({
onSelect: function(dateText, inst) {
var serviceID = $('#Service').val();
var providerID = $('#Provider').val();
$.getJSON('@Url.Action("Calendar/FreeSlots")', { serviceId: serviceID, providerId: providerID, date: dateText }, function (slots) {
var TimeSlots = $('#TimeSlots');
TimeSlots.empty();
$.each(slots, function (index, slot) {
TimeSlots.append($('<option/>', {
value: slot.value,
text: slot.text
}));//end append
}); //end each
} //end onSelect
}); //End datepicker attributes ----> Firebug Error: missing ) after argument list
}); ///End Document Ready
我已经检查并仔细检查了,但我不知道如何修复语法。您可以在评论中看到 Firebug 告诉我语法错误。请帮忙