日期:2014-05-16  浏览次数:20304 次

取得radio显示的文本的内容
如题,谢谢

------解决方案--------------------
你是在什么时候取得,页面提交后?
如果在原来的页面里,可以直接用该radio的label属性获取,提交后就无法通过表单得到的。
------解决方案--------------------
<input type=radio id=r1><span>radio内容</span><br>
<input type=button onclick=doit() value=" 提取 ">

<script>
function doit(){
alert(document.getElementById("r1").nextSibling.innerText);
}
</script>

只能这样。