var dictionarys=[];
var temp = document.getElementsByName("rselect");
if (temp != null) {
if (temp.length != null) {
for(i=0;i<temp.length;i++) {
if(temp[i].checked) {
dictionarys[dictionarys.length]=temp[i].value;
}
}
}
}
<input type="checkbox" name="rselect" value=""/>
.........
var temp = document.getElementsByName("rselect");
if (temp != null) {
if (temp.length != null) {
for(i=0;i<temp.length;i++) {
if(temp[i].checked) {
dictionarys[dictionarys.length]=temp[i].value;
}
}
}
}
<input type="checkbox" name="rselect" value=""/>
.........
解决方案 »
- DIV隐藏后,提交时不提交该DIV里的数据怎么弄?
- 请高手解答
- 将一个字符串插入数据库,要求在字符串中含用单引号时也能正常插入,有什么好方法吗?!!!!!!!!!!!!!
- mysql-connector-java-3.1.10-bin-g.jar 和 mysql-connector-java-3.1.10-bin.jar两个文件有什么不同呀?
- 以下这问题是什么意思呀,我的其它用BEAN的网页都有可以用呀!
- ×××××乱码的问题,很急啊,在线等~~~
- 怎样在导入数据的过程事加入进度条
- 求解关于jsp中session的问题?(在现等)
- 点击 “按钮” 如何弹出一个新页面。
- JDBC与TOMCAT的问题
- 谁能我数据库的连接池代码完整程序啊,我急用啊,谢谢各位!
- 急问!取系统时间显示的问题
<head>
<title>Checkbox Test</title>
<script language="javascript">
function show() {
var temp = document.form1.box;
var i;
for(i = 0 ; i < temp.length ; i++) {
alert(temp[i].checked);
alert(temp[i].value);
}
}
</script>
</head><body>
<form name="form1">
<input type="checkbox" name="box" value="1">1<br>
<input type="checkbox" name="box" value="2">2<br>
<input type="checkbox" name="box" value="3">3<br>
<input type="button" value="click me" onClick="show()">
</form>
</body>
</html>