[英]jquery datepicker ajax
I am trying to send an ajax request immediately after a date is chosen with the jquery datepicker. 我正在尝试使用jquery datepicker选择日期后立即发送ajax请求。
I have: 我有:
<script>
$(function() {
$( "#datepicker" ).datepicker({dateFormat: "dd-mm-yy" });
});
var sentdate=("#datepicker").val();
$.ajax({
url: "callthephp.php?d="+sentdate,
success: function(data) {
$("#output").html(data);
}
});
</script>
<div class="demo">
<p>Date: <input id="datepicker" type="text"></p>
</div>
<div class="output">
</div>
Any ideas how I get this working? 有什么想法可以让我工作吗?
火使用Ajax调用onSelect
的事件日期选择器 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.