赞
踩
js:取得单选按钮的值
<input type="radio" name="radiobutton" checked="checked" value="1" />
<input type="radio" name="radiobutton" value="2" />
<script language="javascript">
function aa()
{
for(i=0;i<=document.all['radiobutton'].length-1;i++)
{
if(document.all['radiobutton'][i].checked)
{
window.alert(document.all['radiobutton'][i].value);
}
}
}
</script>
<input type="button" name="Submit" value="按钮" οnclick="aa()" />
js:帮单选设置选中项
document.all['radiobutton'][1].checked='true'
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。