Code:
<form name="return" action="/" method ="post" id ="form">
<input type ="checkbox" name ="box1" group ="checkbox" checked="checked">
<input type ="checkbox" name ="box2" group ="checkbox">
<input type ="checkbox" name ="box3" group ="checkbox">
<select name="select1">
<option value="0">0</option>
<option value="1">1</option>
</select>
</form>
<script>
function get(){
// get value of selected checkbox
//取得checkbox被选中的项目
// 用,连接各个值
var check = jQuery('[group ="checkbox"]:checked').map(function(){
Return jQuery(this).val();
}).get().join(',');
jQuery('[group ="checkbox"]').each(function(I){
Var count = i + 1;
var check2=jQuery('[name="box'+count+'"]').map(function(){return count;}).get();
}
}
</script>
No comments :
Post a Comment