<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/taglib/c.tld" prefix="c"%>
<span>班级分类：</span>
<select class="label-option-middle report-parameter-optional" id="class_group" name="class_group">
</select>
<script type="text/javascript">
$(function(){
	$('#exam_id').change(updateClassGroup);
	updateClassGroup();
})

function updateClassGroup(){
	var examId = $('#exam_id option:selected').val();
	if(examId!=undefined && examId.length>0){
		$.post('${ctx}/analysis/condition/class-groups.json',{"examId":examId},function(res){
			$('#class_group').html('');
			$('#class_group').append($('<option value="">不限</option>'));
			$.each(res.groupList,function(index,obj){
				var row = $('<option value="'+obj+'">'+obj+'</option>');
				$('#class_group').append(row);
			});
		});
	}
}
</script>