JS如何取到RadioButtonList所选中的值呢?

zning8191 2010-12-02 05:49:29

<a style="text-decoration:none; color:Blue; cursor:hand;"
onclick="window.open('Default2.aspx?type=','newwindow', 'height=400, width=600, toolbar =no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');">设置</a>

这是一个超级链接,我想通过这个超级链接打开一个页面并传递一个参数,这个参数的来源为

<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatDirection="Horizontal" AutoPostBack="True"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
<asp:ListItem Value="1" Selected="True">A</asp:ListItem>
<asp:ListItem Value="2">B</asp:ListItem>
<asp:ListItem Value="3">C</asp:ListItem>
<asp:ListItem Value="4">D</asp:ListItem>
<asp:ListItem Value="5">E</asp:ListItem>
<asp:ListItem Value="6">F</asp:ListItem>
<asp:ListItem Value="7">G</asp:ListItem>
</asp:RadioButtonList>

如何在红色区域中传值呢?
...全文
90 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zning8191 2010-12-03
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 hch126163 的回复:]
查看一下 生成的html 代码,
Radio 是一个数组,循环判断checked 就可以了
[/Quote]

这个方法我知道,但是不想写js方法!
有别的方法吗?
zning8191 2010-12-03
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 lingxx0103 的回复:]
你是一个window.open 并没有submit
建议写一个js函数,取得radio的值,通过window.open传递
否则新画面无法取得radio的值
[/Quote]

嗯 嗯 同意
LingXX0103 2010-12-03
  • 打赏
  • 举报
回复
你是一个window.open 并没有submit
建议写一个js函数,取得radio的值,通过window.open传递
否则新画面无法取得radio的值
huminghua 2010-12-03
  • 打赏
  • 举报
回复
你不想用JS的话,那你就用后台代码咯!在cs里面写咯,this.RadioButtonList1.SelectedValue
hch126163 2010-12-02
  • 打赏
  • 举报
回复
查看一下 生成的html 代码,
Radio 是一个数组,循环判断checked 就可以了
zning8191 2010-12-02
  • 打赏
  • 举报
回复
也就是这里:

'Default2.aspx?type='

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧