赞
踩
<input type="radio" name="abc" value="hello" />
<input type="radio" name="abc" value="world" />
<input type ="button" οnclick=printOut() />
以下是Javascript代碼:
function printOut(){
var list = document.getElementsByName("abc");
for( i =0 ; i<list.length; i++ ){
if( list[i].checked == true ){
alert(list[i].value);
break;
}
}
}
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。