ajax tabcontainer中的Jquery datetimepicker()
我的asp.net页面中有Ajax选项卡容器。 我正在使用jquery通过单击文本框来选择日期。但是jquery在Ajax选项卡容器中不起作用 下面是我正在使用的代码ajax tabcontainer中的Jquery datetimepicker(),jquery,asp.net,ajax,Jquery,Asp.net,Ajax,我的asp.net页面中有Ajax选项卡容器。 我正在使用jquery通过单击文本框来选择日期。但是jquery在Ajax选项卡容器中不起作用 下面是我正在使用的代码 <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" href="http://co
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script type="text/javascript">
$(document).ready(function () {
$(".datecontrol").datepicker();
});
</script>
</script>
</head>
<body>
<form id="form1" runat="server">
<ajax:ToolkitScriptManager ID="scriptmanager1" runat="server">
</ajax:ToolkitScriptManager>
<div class="Wrapper">
<ajax:TabContainer ID="TabContainer1" runat="server" CssClass="fancy fancy-green"
ActiveTabIndex="0">
<ajax:TabPanel ID="tbpnluser" runat="server">
<HeaderTemplate>
New Patient</HeaderTemplate>
<ContentTemplate>
<asp:Panel ID="UserReg" runat="server">
<asp:TextBox ID="txtDob" runat="server" CssClass="datecontrol"></asp:TextBox>
</asp:Panel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</div>
</form>
</body>
</html>
$(文档).ready(函数(){
$(“.datecontrol”).datepicker();
});
新病人
jQuery
无法工作,因为您没有在HTML页面上包含jQuery库
从这里包括最新的jquery库
:
脚本中没有包含文本框的id。请执行此操作
$(document).ready(function () {
$("#txtDob").datepicker();
});
另外,u应该包括jquery,如下所示
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
有关详细信息,请参见此您需要导入以下文件。您只包含css文件,而不包含js文件
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>