Help me!!(急)

lilysunlily 2002-05-26 10:46:49
下面是就我的理解写的关于下拉框的代码,可是我得不到和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>
...全文
4 点赞 收藏 1
写回复
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
saintKnight 2002-05-26
function open(){
window.open("../jsp/UserProfile.jsp");
}

String department=request.getParameter("select") ;
if(department!=null && !department.equals("")) {
执行数据集的查询;
}

<select name="select" onChange="open()">
<option selected>Select a department...</option>
<% while (ss.next()){
++s;
out.println("<option value=s>"+ss.getString("DepartmentName")+"</option>");
}%>
</select>
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告