<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default28.aspx.cs" Inherits="Default28" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function aa()
{
//var radbl=document.all("RadioButtonList1");
var radbl=document.all.RadioButtonList1;
var reoption ;
for(var i=0;i<radbl.length;i++)
{
if(radbl[i].checked)
{
reoption=radbl[i].value;
}
}
alert(reoption);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" name="RadioButtonList1">
<asp:ListItem Selected="True">A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
</asp:RadioButtonList>
</div>
</form>
</body>
</html>
IE6与IE8都兼容的RadioButtonList值获取方法
最新推荐文章于 2025-08-21 16:44:59 发布