<%@ page language="java" pageEncoding="utf-8"%>
<span class="help-inline">班级：</span>
<select class="span2 report-parameter" id="class_id" name="class_id">
</select>
<script type="text/javascript">
$(function(){
	$('#exam_id').change(updateClasses);
	
	updateClasses();
})

function updateClasses(){
	var exam_id = $('#exam_id option:selected').val();
	if(exam_id!=undefined && exam_id.length > 0){
		$.post('${ctx}/analysis/condition/classes.json',{"examId":exam_id, "schoolId":${school_id}},function(res){
			$('#class_id').html('');
			$.each(res,function(index,obj){
				var row = $('<option value="'+obj.name+'">'+obj.name+'</option>');
				$('#class_id').append(row);
			});
		});
	}
}
</script>