即时通讯尝试从在线使用jquery生成我的datepicker。在我的标记,它是:跟着datepicker不工作jquery
<asp:TextBox ID="PStart" runat="server"></asp:TextBox>
通过
<script type = "text/javascript">
$(function() {
$("#PStart").datepicker({
showOn: "button",
buttonImage: "images/calendar.gif",
buttonImageOnly: true
});
});
</script>
,并在我的我的网站主人的头我已经包括:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script type ="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type ="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
一点要注意的是,这个日期选择器嵌套在更新面板中,该面板仅在完成表单并单击提交/保存按钮后才更新。我将shildren设置为false并更新模式为有条件但没有显示,更不用于做出选择。
它对我来说工作正常[DEMO](http://jsfiddle.net/7JJNu/) – abc123
@ abc123自从他使用asp网络以来,不是一个有效的演示。 – Dom
@Dom证明问题不在于javascript,jquery,jquery-ui ....这里的问题很可能是他的ID在页面呈现时不是'PStart' ......他需要检查使用broswer的元素......它可能都是从asp.net中弄坏的......这个问题有3种解决方案,但我需要他来验证它。 – abc123