DropDownList:
aspx:
<asp:DropDownList ID="rdKc" runat="server" Height="16px" Width="127px">
<asp:ListItem Text="是" Value="是"></asp:ListItem>
<asp:ListItem Text="否" Value="否" Selected="True"></asp:ListItem>
</asp:DropDownList>
js:
var op = document.getElementById("rdKc");
if(op.value == "是"){ ........}
RadioButtonList :
html:
<asp:RadioButtonList ID="rdCaseType" runat="server"
RepeatDirection="Horizontal" style="font-size: small; " AutoPostBack="True">
<asp:ListItem Text="值0" Value="0"></asp:ListItem>
<asp:ListItem Text="值1" Value="1"></asp:ListItem>
<asp:ListItem Text="值2" Value="2"></asp:ListItem>
<asp:ListItem Text="值3" Value="3"></asp:ListItem>
</asp:RadioButtonList>
js:
var traget = document.getElementById('rdCaseType');
var iCell = obj.cells.length;
for (var i = 0; i < iCell;i ++)
{
oneCell = obj.cells[i];
var vl = oneCell.firstChild.value;
if (oneCell.firstChild!="undefined" && vl !="undefined")
{
if (oneCell.firstChild.checked)
{
alter( vl ); }
}
}