Javascript JQuery第二个单选按钮不工作

Javascript JQuery第二个单选按钮不工作,javascript,jquery,Javascript,Jquery,我在更新JQuery页面上的第二个单选按钮值时遇到问题 这是我的HTML: <div id="system-modes-fpa" class="ui-buttonset"> <input type="radio" id="system-fpa-mode-TIMELAPSE" name="radio" value="TIMELAPSE" class="ui-helper-hidden-accessible"> <label for="system-fp

我在更新JQuery页面上的第二个单选按钮值时遇到问题

这是我的HTML:

<div id="system-modes-fpa" class="ui-buttonset">
    <input type="radio" id="system-fpa-mode-TIMELAPSE" name="radio" value="TIMELAPSE" class="ui-helper-hidden-accessible">
    <label for="system-fpa-mode-TIMELAPSE" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" role="button" aria-disabled="false" aria-pressed="false"><span class="ui-button-text">Timelapse</span>
    </label>
    <input type="radio" id="system-fpa-mode-CONTINUOUS" name="radio" value="CONTINUOUS" class="ui-helper-hidden-accessible">
    <label for="system-fpa-mode-CONTINUOUS" class="ui-button ui-widget ui-state-default ui-button-text-only" role="button" aria-disabled="false" aria-pressed="false"><span class="ui-button-text">Continuous</span>
    </label>
    <input type="radio" id="system-fpa-mode-RAMP_AND_HOLD" name="radio" value="RAMP_AND_HOLD" class="ui-helper-hidden-accessible" checked="checked">
    <label for="system-fpa-mode-RAMP_AND_HOLD" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-right" role="button" aria-disabled="false" aria-pressed="false">    <span class="ui-button-text">Ramp and Hold</span>
    </label>
</div>
<div id="system-modes-stillimage" class="ui-buttonset">
    <input type="radio" id="system-stillimage-mode-TIMELAPSE" name="radio" value="TIMELAPSE" class="ui-helper-hidden-accessible">
    <label for="system-stillimage-mode-TIMELAPSE" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" role="button" aria-disabled="false" aria-pressed="false">    <span class="ui-button-text">Timelapse</span>
    </label>
    <input type="radio" id="system-stillimage-mode-CONTINUOUS" name="radio" value="CONTINUOUS" class="ui-helper-hidden-accessible">
    <label for="system-stillimage-mode-CONTINUOUS" class="ui-button ui-widget ui-state-default ui-button-text-only" role="button" aria-disabled="false" aria-pressed="false"><span class="ui-button-text">Continuous</span>
    </label>
    <input type="radio" id="system-stillimage-mode-RAMP_AND_HOLD" name="radio" value="RAMP_AND_HOLD" class="ui-helper-hidden-accessible">
    <label for="system-stillimage-mode-RAMP_AND_HOLD" class="ui-button ui-widget ui-state-default ui-button-text-only ui-state-active ui-corner-right" role="button" aria-disabled="false" aria-pressed="true"><span class="ui-button-text">Ramp and Hold</span>
    </label>
</div>


调用第二个更新时,第一个无线组将丢失其值。我做错了什么?

更改
名称
属性:

第一组应该是

name="radio1"
第二个呢

name="radio2"

单选组是具有相同
名称
属性的所有按钮。他们是否在不同的部门并不重要。如果你想让这两组人分开,你必须给他们起不同的名字。因此,第一组可能是:

name="radio-fpa"
第二个问题是:

name="radio-stillimage"

你只有一个无线电组。他们都有
name=“radio”
。你发现了错误,所以我给你评分。非常感谢@我很乐意为你效劳。我们都会时不时地遇到这样的小事。谢谢你的解释。这正是我所做的。
name="radio-stillimage"