<%@ page language="java" pageEncoding="utf-8"%>
<span class="help-inline">科目：</span>
<select class="span1 report-parameter" id="subject_id" name="subject_id">
</select>
<script type="text/javascript">
$(function(){
	updateSubjects();
})

function updateSubjects(){
	var exam_id = $('#exam_id').val();
	if(exam_id!=undefined && exam_id.length > 0){
		$.post('${ctx}/student/condition/subjects.json',{"examId":exam_id},function(res){
			$('#subject_id').html('');
			$.each(res,function(index,obj){
				var row = $('<option value="'+obj.id+'">'+obj.name+'</option>');
				$('#subject_id').append(row);
			});
			$('#subject_id').trigger('change');
		});
	}
}
</script>