Javascript 如何使用重复水平模式获取单选按钮列表行/列长度

Javascript 如何使用重复水平模式获取单选按钮列表行/列长度,javascript,c#,jquery,asp.net,Javascript,C#,Jquery,Asp.net,我的单选按钮列表有3个值,当我垂直重复时,它给出的行长度为3,但当我水平重复单选按钮列表时,它给出的行长度为1。 var radiosub = document.getElementById('ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_' + i); if (radiosub != null) {

我的单选按钮列表有3个值,当我垂直重复时,它给出的行长度为3,但当我水平重复单选按钮列表时,它给出的行长度为1。

var radiosub = document.getElementById('ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_' + i);

if (radiosub != null) {                                                                  
  var radiosubcount = radiosub.rows.length;
  alert(radiosubcount);  
}  
我的视图页面源代码布局

<table id="ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3" class="spaced">
            <tbody><tr>
                <td><input id="ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3_0_3" type="radio" name="ctl00$ContentPlaceHolder1$JewelleryServices$dtbindjewellery$ctl03$radiosub" value="7"><label for="ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3_0_3">Yellow Gold</label></td>
               <td><input id="ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3_1_3" type="radio" name="ctl00$ContentPlaceHolder1$JewelleryServices$dtbindjewellery$ctl03$radiosub" value="8"><label for="ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3_1_3">Rhodium White Gold</label></td>
               <td><input id="ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3_2_3" type="radio" name="ctl00$ContentPlaceHolder1$JewelleryServices$dtbindjewellery$ctl03$radiosub" value="9"><label for="ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3_2_3">Rose Gold</label></td>
            </tr>
        </tbody></table>

黄金
铑白金
玫瑰金

当我重复单选按钮水平时,如何将计数设为3

如果要计算水平单选输入,可以使用此代码查找计数/长度

document.getElementById("ContentPlaceHolder1_JewelleryServices_dtbindjewellery_radiosub_3").rows[0].cells.length;  // this will return the length of the cell from first row of the tabl. If you want to count the succeeding row column, you have to change the array index as 1,2...

当你说水平重复时,你是指在表格中还是使用CSS?你们有一个你们正在使用的标记的例子吗?我重复单选按钮列表,从代码的侧面看是水平的,在inspect上,它显示1 tr和3 td。像wise一样,我重复它,它显示3 tr。这是一个问题。我如何计算重复列数?您能否发布生成的标记?从您正在使用的浏览器中的查看源?@AndrewLeedham