如何使用javascript检查/取消选中单选按钮 [英] How do I check/uncheck radio buttons using javascript
本文介绍了如何使用javascript检查/取消选中单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个单选按钮和一个用于在asp.net制作图表的单选按钮列表...
这两个按钮代表两个不同的值,我无法将它们组合起来...
如果选中单选按钮列表中的任何一个按钮并取消选中,我想取消选中单选按钮单击单选按钮时的单选按钮列表...
Hi,
I have a radio button and a radio button list used for making chart in asp.net...
These two buttons represent two different values and I cannot combine them...
I want to un-check the radio button if any one of the buttons in the radio button-list is checked and un-check the radio button-list if the radio button is clicked...
<asp:RadioButton ID="rbtnZone" runat="server" GroupName="rb" Text="Zone Wise" />
<asp:RadioButtonList ID="rbtnStore" runat="server" CellPadding="3" GroupName="rb" RepeatColumns="4" RepeatDirection="Horizontal">
</asp:RadioButtonList>
推荐答案
这是一个使用jquery的例子:
Here is one example using jquery :
<asp:RadioButton ID="rbtnZone" runat="server" GroupName="rb" Text="Zone Wise" />
<br />
<asp:RadioButtonList ID="rbtnStore" runat="server" CellPadding="3" GroupName="rb"
RepeatColumns="4" RepeatDirection="Horizontal">
</asp:RadioButtonList>
( document )。ready( function (){
(document).ready(function () {
(' #rbtnZone')。click( function (){
('#rbtnZone').click(function () {
这篇关于如何使用javascript检查/取消选中单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文