HTML code
JS code:
function RadioButtonList1Changed()
{
var rbtn = document.getElementByIdx_x("rbtnCompany");
//Get all radios
var list= rbtn .getElementsByTagName_r("input");
for (var i = 0; i < list.length; i ) {
if (vRbtidList[i].checked) {
var text = rbtn .cells[i].innerText;
var value = list[i].value;
alert("checked The text value of the item is " text ", and the value value is " value);
}
}
}
can be specified to obtain a certain value. The following statements are combined of. Get the value of the first item with index 0
alert( document.getElementByIdx_x("rbtnCompany").getElementsByTagName_r("input")[0].value);//The result is 1
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn