asp.net中怎样用Javascript控制RequiredFieldValidator控件什么时候启用,什么时候不启用验证?

Enable/Disable RequiredFieldValidator with Javascript

document.getElementById("requiredfieldvalidatorid").enabled = false;

<asp:DropDownList ID="ddlServiceName" runat="server" onchange='var DateValidator = document.all ? document.all["DateValidator "] : document.getElementById("DateValidator ");DateValidator .enabled = false;'></asp:DropDownList>

原文地址:https://www.cnblogs.com/emanlee/p/1814052.html