Jquery 如何在(ALL)单选按钮中获得两个单选按钮值,注意ALL在我的代码中是单选按钮 这就是代码 全部的 从车站 翻腾
我想启动一个查询,该查询将有助于在所有单选按钮中获取第二个和第三个按钮的值。如何执行此操作您可以使用jQuery库的eq()方法来执行此操作。请记住,eq()方法使用的DOM元素的索引从0开始。 要获取第二个输入的值,我们需要调用索引号1Jquery 如何在(ALL)单选按钮中获得两个单选按钮值,注意ALL在我的代码中是单选按钮 这就是代码 全部的 从车站 翻腾,jquery,codeigniter-2,Jquery,Codeigniter 2,我想启动一个查询,该查询将有助于在所有单选按钮中获取第二个和第三个按钮的值。如何执行此操作您可以使用jQuery库的eq()方法来执行此操作。请记住,eq()方法使用的DOM元素的索引从0开始。 要获取第二个输入的值,我们需要调用索引号1 This the code <label class="opetionLabel"> <input class="col-4 optionStyle" type="radio" name="selec
This the code
<label class="opetionLabel">
<input class="col-4 optionStyle" type="radio" name="select_all" value="all"> All.
</label>
<label class="opetionLabel">
<input class="col-4 optionStyle" type="radio" name="select_all" value="From Station" > From Station
</label>
<label class="opetionLabel">
<input class="col-4 optionStyle takeClass" type="radio" name="select_all" value="ToStation "> ToStation
</label>
$(document).ready(function(){
var second = $('input[name=select_all]').eq(1).val();
var third = $('input[name=select_all]').eq(2).val();
alert(second);
alert(third);
});