<script>
function checkSelect()
{
for (i = 0 ;i<document.all.rbSelect.length;i++)
if (document.all.rbSelect[i].checked)
document.forms[0].textTest.value = document.all.rbSelect[i].value;
}
</script>
试试。
function checkSelect()
{
for (i = 0 ;i<document.all.rbSelect.length;i++)
if (document.all.rbSelect[i].checked)
document.forms[0].textTest.value = document.all.rbSelect[i].value;
}
</script>
试试。
解决方案 »
- jquery load 一个含有js的网页出错,文件已上传,急,在线等
- 用JS产生新div问题
- 框架页面地址获取(高分)
- 如何让window.close()不弹出提示框
- 问个很弱的问题,求几行代码,
- 简单脚本,为什么会错?
- 我正找一门JavaScript的入门教材,需要循序见进的学习,能推荐一下吧!?谢谢。
- onmousemove="this.style.cursor='hand';'hand'可以改变为其它形状吗?比如箭头!!
- 关于ASP树型结构取数据的问题,急呀~~~~
- easyUi中combobox的禁用和启用
- 怎么样能让一个TD里的TEXT框长度正好充满这个TD??????
- 下拉菜单的问题。
<input type=radio name="rbSelect" value=1>
<input type=radio name="rbSelect" value=2>
<input type=radio name="rbSelect" value=3>
<input type=text name=textTest>
<input type=button value=set onclick=checkSelect()>
</form>
<script>
function checkSelect()
{
var objs=document.all("rbSelect");
for(var i=0;i<objs.length;i++){
if(objs[i].checked==true){
document.forms[0].textTest.value = objs[i].value;
break;
}
}
}
</script>