<script type="text/javascript"> function test() { var s = document.getElementById("classes"); if(s.selectedIndex==0) { alert("请选择课程"); return false; } return true; } </script>