[英]Datepicker not show when I check textbox(use asp.net web form)
我嘗試使用 jQUERY ui 中的 datepicker,但是當我單擊文本框時它沒有顯示日歷。 我盡我最大的努力嘗試不同的方法,但它仍然不起作用。 我使用了這段代碼:[https://jqueryui.com/datepicker/][1]
這是我的 aspx 代碼:(我使用過母版頁)
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.0/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#<%=datepicker.ClientID %>').datepicker();
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:TextBox ID="datepicker" runat="server"></asp:TextBox>
</asp:Content>
誰能幫我? 首先謝謝大家。
您的代碼在沒有母版頁的表單中對我來說很好,您的母版頁和您的 aspx 頁面存在沖突。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.