<script type="text/javascript">
function hs(){
var s = document.getElementsByName("chkStudent");
var s2 = "";
for( var i = 0; i < s.length; i++ )
{
if ( s[i].checked ){
s2 += s[i].value + ',';
}
}
s2 = s2.substr(0,s2.length-1);
alert(s2);
location.href = "这里传过去的是已逗号分隔开的id,需要在后面的页面内取出
}
</script>
<INPUT TYPE="checkbox" NAME="chkStudent" value=1>1<br>
<INPUT TYPE="checkbox" NAME="chkStudent" value=2>2<br>
<INPUT TYPE="checkbox" NAME="chkStudent" value=3>3<br>
<INPUT TYPE="checkbox" NAME="chkStudent" value=4>4<br>
<INPUT TYPE="checkbox" NAME="chkStudent" value=5>5<br>
<INPUT TYPE="button" value='' 查看结果'' οnclick="hs()">