<asp:RadioButton ID="RadioYes" runat="server" Text="同意" />
<br />
<asp:RadioButton ID="RadioNo" runat="server" Text="不同意"/>
判断这俩个第一个选中
<asp:Button ID="BtnUpLoad" runat="server" Text="上传" onclick="BtnUpLoad_Click"
Enabled="False" />
的Enabled为true 第二个选中Enabled为false
<br />
<asp:RadioButton ID="RadioNo" runat="server" Text="不同意"/>
判断这俩个第一个选中
<asp:Button ID="BtnUpLoad" runat="server" Text="上传" onclick="BtnUpLoad_Click"
Enabled="False" />
的Enabled为true 第二个选中Enabled为false
解决方案 »
- MVC2中使用html页面
- [网页编辑器kindeditor]在asp.net中如何把数据库的值读到编辑框中
- 用户角色权限问题
- vs2005 關於刷新 MultiView 控件內容的問題.!!!50分
- iis升级到asp.net2.0后,以前用asp.net1.1的程序还能正常运行吗?
- 请问下面的vbscript应当怎么写
- 在webconfig已经设置enableViewState="false"了,有什么方法在某个页面中启用ViewState
- 把日期变成学期怎么弄
- 网站如果分为上、左下,和右下三部分,用什么方式做比较好呢?
- 数据库中按某个字段排序的问题
- CSS简单问题,如何单独定义GridView表头超链接样式
- gridview中的checkboxfield怎么用
if (document.getElementById('RadioYes').checked)
{
return true;
}
else
alert("请选择……");
<script type="text/javascript">
function is()
{
if(document.getElementById("RadioYes").checked==true)
{
alert("YES");
document.getElementById('BtnUpLoad').disabled=document.getElementById('RadioYes').checked;
}
else if(document.getElementById("RadioNo").checked==true)
{
alert("NO");
document.getElementById('BtnUpLoad').disabled=document.getElementById('RadioYes').checked;
}
}
</script><asp:RadioButton ID="RadioYes" runat="server" Text="同意" onclick="is()" />
<br />
<asp:RadioButton ID="RadioNo" runat="server" Text="不同意" onclick="is()"/>
<asp:RadioButton ID="RadioYes" runat="server" Text="同意" onclick="is()" GroupName="ss" ValidationGroup="ss"/>
没有ONCLICK事件
document.getElementById('BtnUpLoad').disabled没有disabled checked这些属性,
为什么会出现这样现象,我以前些怎么不这样.因为不出现所以才问大家的 帮忙看看有遇到过这种现象的没
<input type="radio" id="RadioYes" runat="server" Text="同意" onclick="is()" GroupName="ss" ValidationGroup="ss"/>
<input type="radio" id="RadioNo" runat="server" Text="同意" onclick="is()" GroupName="ss" ValidationGroup="ss"/>
以后能不用到服务器控件就不要用,服务器控件的垃圾东西很多,用HTML控件加个ruant="server" 比较好