应该是
alert("Value:"+myform.cctype[0].value);
alert("Value:"+myform.cctype[0].value);
解决方案 »
- 用正则将某个区间的文字删除的问题
- 求火狐关闭页面js
- 求iframe自动调高的方法(iframe中套的是frameset)
- 如何点击一个按钮,就会打开客户机上的一个程序.
- 如何使选种的记录变色
- str=fm.username.value;我想将str当作session一样保存起来,该怎么办?
- 按钮边框的问题
- 关于隐藏表格的某行row后,页面的格式问题
- 504 Gateway Time-out 用时1m 各位有什么解决办法吗
- 新手学习js,在html中无法显示js编写的内容!求助!
- 梅花雨以及各位JS高手:如何在打开一个页面时没有菜单,没有地址栏等,然后我把它缩小改成自己的菜单栏,但它却闪得厉害,救救我。怎么办
- 如何取子串!
l =document.getElementsByName("cctype")
for(i=0;i<l.length,i++) alert(l[i].value)
}***********
<form name="myform" action="" method="post">
<input type="radio" name="cctype" value="1">1
<input type="radio" name="cctype" value="2">2
<input type="radio" name="cctype" value="3">3
</form>
<a href="javascript:getQue()">click</a>
<!--
function getQue(){
l =document.getElementsByName("cctype");
for(i=0;i<l.length;i++) if(l[i].checked)alert(l[i].value)
}
//-->
</script>
***********
<form name="myform" action="" method="post">
<input type="radio" name="cctype" value="1">1
<input type="radio" name="cctype" value="2">2
<input type="radio" name="cctype" value="3">3
</form>
<a href="#" onclick="getQue();return false">click</a>