js获取select选中的值: var sel=document.getElementById("select1"); var index = sel.selectedIndex; // 选中索引 albumid= sel.options[index].value;//要的值 jQuery获取下拉框选中的option: $("#s option:selected").val();
方法一 Controller 部分代码: public ActionResult Modify(int id) { //3.1.1 检查id //3.1.2根据id查询数据 Models.Student stu = (from s in db.Students where s.Id == id select s).FirstOrDefault(); //方法一.查询班级数据,并 做成 下拉框 选项集合 //List<Models.Class> listClass = (from c in d