I have a jquery datepicker where when a date is selected, it is passed to the codebehind and in there it is inserted into a dropdownlist. 日期传递得很好,但它没有插入到下拉列表中。好像面板没有更新。有没有办法从代码隐藏更新面板。面板.更新();- 不工作。这是javascript函数
function clicked() {
$('#<%=link_btn.ClientID%>').click(function() {
$('#datepicker').datepicker({
dateFormat: "yy-mm-dd",
onSelect: function() {
var date = $(this).datepicker('getDate');
var newDate = $.datepicker.formatDate("yy,mm,dd", date);
var dataToSend = { newDate: newDate};
$.ajax({
url: "url",
data: dataToSend,
type: "POST",
success: function(result) {
alert("success");
}
})
}
});
}