添加母版页内容时,jquery日期选择器不起作用 占位符。得到错误 - TypeError:$(...)。datepicker不是 功能
<asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script type="text/javascript">
$(function () {
$("input[id$=txtDatepicker]").datepicker({
changeMonth: true,
changeYear: true
});
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:TextBox ID="txtDatepicker" runat="server"></asp:TextBox>
</asp:Content>
答案 0 :(得分:3)
使用abc.select{|hash| (ghi.to_a - hash.to_a).empty?}
代替#txtDatepicker
input[id$=txtDatepicker]