单选按钮更改时如何设置相同的值(选择某人时)
<body>
<label>slect color:</label>
<br>
<label><input type="radio" name="logic_01">YES</label>
<label><input type="radio" name="logic_01">NO</label>
<br>
<label><input type="radio" name="logic_02">YES</label>
<label><input type="radio" name="logic_02">NO</label>
<br>
<label><input type="radio" name="logic_03">YES</label>
<label><input type="radio" name="logic_03">NO</label>
<script>
$('input[type=radio]').change(function(){
$(this).attr("value","SS")
})
</script>
</body>
例如,选择名称逻辑_01,然后
<label><input type="radio" name="logic_01" value="logic_01">YES</label>
<label><input type="radio" name="logic_01" value="logic_01>NO</label>
使用属性选择器选择具有当前名称的所有单选按钮。
我认为您以错误的方式使用了无线电输入,如果选择了输入,则它们应该具有相同的名称和不同的值以进行捕获: