复选框的取值问题! 判断哪个复选框的checked属性是TRUE,取它的值就是了如果你知道复选框的个数,可以用FOR循环来判断 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 参考以下代码:<form name=form1 onsubmit=nn()><input type="checkbox" name="A" value="11">teacher1<input type="checkbox" name="A" value="22">teacher2<input type="checkbox" name="A" value="33">teacher3<input type="checkbox" name="A" value="44">teacher4<input type=submit name=submit><script>function nn(){ coll = document.getElementsByName("A"); for(var i=0; i<coll.length;i++) if(coll[i].checked) alert(coll[i].value);}</script> <HTML><HEAD><TITLE></TITLE></HEAD><BODY><form name="myform" method="post" ><input type=checkbox name=a value=1><input type=checkbox name=a value=2><input type=checkbox name=a value=3><input type=checkbox name=a value=4><input type=checkbox name=a value=5><br><input type=button value="check it" onclick=chk()></form><script language=javascript>function chk(){ for (var i=0;i<5;i++) { if (document.myform.a[i].checked) { alert(document.myform.a[i].value) return false } }}</script></BODY></HTML> <form name=form1 ><input type="checkbox" name="A" value="11">teacher1<input type="checkbox" name="A" value="22">teacher2<input type="checkbox" name="A" value="33">teacher3<input type="checkbox" name="A" value="44">teacher4<input type=submit name=submit></form>另一个页面<% for i=0 to request.form("A").count Response.write "每一个值为"&Request.form("A")(i)&"<br>" next%> <%//得到选择的项String[] strSystemNo = request.getParameterValues("chbx_SystemNo");%> 在另外个页面dim strcodestrcode=request.form("A")然后用split分开得到每个号码值然后用for ...next取出来做删除等其他操作 如何将textarea内容发送到指定位置 js 急急急!!!!! JS正则表达式提取文章前两段该怎么写?? 50分,求DTREE的简单改动 传递图片问题 来者有分,使用过dTree的请进,如何去掉或者隐藏最顶部的根节点,在线急等! 给100分继续研究JavaScript正则 关于如何获取格式形如"20041123T133423.000Z"的时间格式 关于js打开子窗口问题,大家帮帮忙 谢谢! 关于点击图片提交表单的问题,急!!!!!!!!!!!!!!! 浏览器工具栏中的打印按纽 一个很简单的问题,是我不太会用javascript,各位大虾帮帮忙! 关于隐藏表格问题?谢谢
<form name=form1 onsubmit=nn()>
<input type="checkbox" name="A" value="11">teacher1
<input type="checkbox" name="A" value="22">teacher2
<input type="checkbox" name="A" value="33">teacher3
<input type="checkbox" name="A" value="44">teacher4
<input type=submit name=submit>
<script>
function nn()
{
coll = document.getElementsByName("A");
for(var i=0; i<coll.length;i++)
if(coll[i].checked)
alert(coll[i].value);
}
</script>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY><form name="myform" method="post" ><input type=checkbox name=a value=1>
<input type=checkbox name=a value=2>
<input type=checkbox name=a value=3>
<input type=checkbox name=a value=4>
<input type=checkbox name=a value=5>
<br>
<input type=button value="check it" onclick=chk()></form>
<script language=javascript>
function chk()
{
for (var i=0;i<5;i++)
{
if (document.myform.a[i].checked)
{
alert(document.myform.a[i].value)
return false
}
}
}
</script></BODY>
</HTML>
<input type="checkbox" name="A" value="11">teacher1
<input type="checkbox" name="A" value="22">teacher2
<input type="checkbox" name="A" value="33">teacher3
<input type="checkbox" name="A" value="44">teacher4
<input type=submit name=submit>
</form>
另一个页面
<%
for i=0 to request.form("A").count
Response.write "每一个值为"&Request.form("A")(i)&"<br>"
next%>
//得到选择的项
String[] strSystemNo = request.getParameterValues("chbx_SystemNo");
%>
dim strcode
strcode=request.form("A")
然后用split分开得到每个号码值
然后用for ...next取出来
做删除等其他操作