改变TextBox的可读性
<script language="javascript">
function ChangeTimeEnable(ddl)
{
if ("是" == ddl.value)
{
document.getElementById('<%=txtRequireTime.ClientID %>').disabled = false;
document.getElementById('<%=txtRealityTime.ClientID %>').disabled = false;
}
else
{
document.getElementById('<%=txtRequireTime.ClientID %>').disabled = true;
document.getElementById('<%=txtRealityTime.ClientID %>').disabled = true;
}
}
</script>
===================
<asp:DropDownList ID="ddlChange" runat="server" onChange="ChangeTimeEnable(this)">
</asp:DropDownList>
<asp:TextBox ID="txtRequireTime" runat="server" ></asp:TextBox>