Help me!!(急)
下面是就我的理解写的关于下拉框的代码,可是我得不到和selectedIndex对应的DepartmentName 的值,我需要怎样改动它啊? 请帮我!
function open(){
if(UserProfile.select.selectedIndex.value!=0)
window.open("../jsp/UserProfile.jsp?DepartmentName="+selectedIndex+"");
}
String department=request.getParameter("DepartmentName") ;
<select name="select" onChange="open(this[this.selectedIndex].value);this.selectedIndex=0">
<option selected>Select a department...</option>
<% while (ss.next()){
++s;
out.println("<option value=s>"+ss.getString("DepartmentName")+"</option>");
}%>
</select>