<asp:RadioButtonList ID="rbtnFInvoiceType" runat="server" onclick="checkType()"
RepeatDirection="Horizontal">
<asp:ListItem Selected="True">收据</asp:ListItem>
<asp:ListItem>发票</asp:ListItem>
</asp:RadioButtonList>
//选择票据类型
function checkType() {
if ($("#rbtnFInvoiceType").find("[checked]").val() == "发票") {
$("#txtFInvoiceCode").attr("readonly", false);
$("#txtFInvoiceCost").attr("readonly", false);
}
else {
$("#txtFInvoiceCode").attr("readonly", true);
$("#txtFInvoiceCost").attr("readonly", true);
$("#txtFInvoiceCode").val("");
$("#txtFInvoiceCost").val("");
}
}
时间: 2024-10-10 12:29:35