我已经应用了jquery函数来掩盖asp.net中的文本框。它工作正常,直到我发回。在回发时,它失去了掩蔽能力。为什么?
<script src="../assets/global/plugins/datatables/dynamic/docs/media/js/jquery.js"></script>
<script src="../assets/global/plugins/input-mask/dist/jquery.maskedinput.js"></script>
然后
<script>
jQuery(function ($) {
$("#txtBoxNICNo").mask("99999-9999999-9", { placeholder: "" });
$("#txtBoxPhoneOffice").mask("+99-99-9999999", { placeholder: "" });
$("#txtBoxPhoneResidence").mask("+99-99-9999999", { placeholder: "" });
$("#txtBoxMobile").mask("+99-999-9999999", { placeholder: "" });
});
and for instance:
</script>
<asp:TextBox ID="txtBoxNICNo" runat="server" onkeypress="return isNumberKeyCNIC(this)" ClientIDMode="Static" placeholder="XXXXX-XXXXXXX-X" MaxLength="15" CssClass="form-control"></asp:TextBox>