110,533
社区成员
发帖
与我相关
我的任务
分享
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
function checkChanged(flog)
{
if(flog==true)
{
alert(flog);
document.all.ddl.disabled=false;
}
else
{
document.all.ddl.disabled=true;
}
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<table>
<tr>
<td>
<input type="checkbox" id="checkbox1" value="测试" onclick="checkChanged(this.checked)">
<asp:DropDownList Runat="server" ID="ddl"></asp:DropDownList>
</td>
</tr>
</table>
</form>
</body>
</HTML>
<script type="text/javascript">
function checkedChanged(flog,name)
{
var CustomValidator2 = document.all ? document.all[name] : document.getElementById(name);
if(flog==true)
{
CustomValidator2.enabled = "True";
}
else
{
CustomValidator2.enabled = "False";
}
}
</script>
<asp:RadioButton ID="B_Kind0" runat="server" GroupName="BKind" onclick="javascript:checkedChanged(this.checked,'CustomValidator2')" />