<script type="text/javascript">
function toSubmitStatus() {
var s_welwords_flag = document.getElementsByName("welwords_flag");
for(var i=0; i<s_welwords_flag.length; i++) {
if(s_welwords_flag[i].checked) {
alert(s_welwords_flag[i].value); break;
}
}
//alert(s_welwords_flag);
}
</script>
<table width="294" border="1">
<tr>
<td>欢迎词设置:
</td>
</tr>
<tr>
<td width="284"><input name="welwords_flag" type="radio" value="0" <%if(welwords_flag!=null && welwords_flag.equals("0")) {out.print("checked");} %>/>
男 </td>
</tr>
<tr>
<td><input name="welwords_flag" type="radio" value="1" <%if(welwords_flag!=null && welwords_flag.equals("1")) {out.print("checked");} %>/>
女</td>
</tr>
<tr>
<td><input type="button" name="toSubmit2" value="修改" οnclick="toSubmitStatus();"/></td>
</tr>
</table>
javascript获取<input type=radio...>的值
原创mb6434c781b2176 ©著作权
文章标签 i++ javascript 文章分类 Python 后端开发
上一篇:Substr()函数
-
Python获取颜色RGB值
Python获取颜色RGB值
Python 图像处理 屏幕截图 -
javascript获取input的值 js怎么获取input的值
首先编写一个HTML,代码如下:<form id="form1"> <table border="0"> <tr> <td> 姓名: </td> <td>
javascript获取input的值 jquery HTML