javascript RadioButtonList获取选中值
人气:0
<script>
function GetRblSeletedValue(obj)
{
var rbltable =$(obj);
var rbs= rbltable.getElementsByTagName("INPUT");
for(var i = 0;i<rbs.length;i++)
{
if(rbs[i].checked)
{
var text =rbltable.cells[i].innerText;
var value=rbs[i].value;
alert("选中项的text值为"+text+",value值为"+value);
}
}
}
function $(id)
{
return document.getElementById(id);
}
</script>
function GetRblSeletedValue(obj)
{
var rbltable =$(obj);
var rbs= rbltable.getElementsByTagName("INPUT");
for(var i = 0;i<rbs.length;i++)
{
if(rbs[i].checked)
{
var text =rbltable.cells[i].innerText;
var value=rbs[i].value;
alert("选中项的text值为"+text+",value值为"+value);
}
}
}
function $(id)
{
return document.getElementById(id);
}
</script>
加载全部内容