<select id="cd_id" name="cd_id">
	<optgroup label="-----科目切换-----"></optgroup>
	<?php foreach ($_SESSION['cd_list'] as $ck=>$cv) :?>
	<option <?php echo ($_SESSION['cd_id'] == $ck)?"selected='selected'":""; ?> value="<?php echo $ck; ?>"><?php echo $cv?></option>
	<?php endforeach; ?>
</select>

<script type="text/javascript">
$(document).ready(function(){
	$("#cd_id").change(function() {
		var cd_id = parseInt($("#cd_id").val());
		if (cd_id != 0) {
			location.href="<?php echo U('menu/showMenu/cd_id/'); ?>"+cd_id;
		} else {
			alert("请您选择科目");
		}
	});
});
</script>