请输入员工所在部门:(text框) 搜索 显示全部
请问在以上界面中,"显示全部"这一块该怎么做啊?
以下是我的代码,请高手帮忙改一下:(关键是"显示全部"这个按钮的onclick事件该怎么写)
<!--#include file="conn.asp"-->
<form action="personnel_botton.asp" method=post>
请输入员工所在部门:<input name="depart" type="text">
<input type="submit" value="搜索">
<input type="button" value="显示全部">
</form>
<%'查询用户信息
depart_name=request.form("depart")
set rs_user=server.CreateObject("adodb.recordset")
if depart_name="" then
sqlstr="select username,staff_name,depart_name,user_pos from user_inf order by username"
else
sqlstr="select username,staff_name,depart_name,user_pos from user_inf where depart_name='"&depart_name&"'"
end if
rs_user.open sqlstr,conn,1,3
%>
<%
set rs_purview=server.createobject("adodb.recordset")
oausername="feng"
sqlstr="select * from user_inf where username='"& oausername &"'"
rs_purview.open sqlstr,conn,1,3
session("Allow_edit_all_personinf")=rs_purview("Allow_edit_all_personinf")
%>
<form action="personnel_detail.asp" method="post">
<table border="1" width="100%">
<tr>
<td>用户名</td>
<td>姓 名</td>
<td>部 门</td>
<td>职 务</td>
<td>详细资料</td>
<td>修 改</td>
<td>删 除</td>
</tr>
<%for j=0 to rs_user.recordcount-1 '将用户表的相应内容写入表格%>
<tr>
<%
username=rs_user("username")
response.Write"<td>" & rs_user("username") & "</td>"
response.Write"<td>" & rs_user("staff_name") & "</td>"
response.Write"<td>" & rs_user("depart_name") & "</td>"
response.Write"<td>" & rs_user("user_pos") & "</td>"
%>
<!--建立详细资料链接 -->
<td><a href="#"onClick="jscript:window.open('personnel_detail.asp?username=<%=rs_user("username")%>','','')"><img src="images/detail.bmp" width="30" height="25" border="0"></a></td>
<%if session("Allow_edit_all_personinf")=true then '如果具有编辑所有员工信息的权限%>
<!--建立修改链接 -->
<td><a href="#"onClick="jscript:window.open('personnel_modify.asp?username=<%=rs_user("username")%>','','')"><img src="images/xiugai.bmp" width="30" height="25" border="0"> </a> </td>
<!--建立删除链接 -->
<td><a href="personnel_del.asp?username=<%=rs_user("username")%>" onclick="return window.confirm('确定删除吗?')"><img src="images/delete.bmp" width="30" height="25" border="0"></a></td>
<%else if session("Allow_edit_all_personinf")=false then '如果不具有编辑所有员工信息的权限%>
<td><img src="images/xiugai.bmp" width="30" height="20" border="0"></td> <!--显示修改图标,但不能修改 -->
<td><img src="images/delete.bmp" width="30" height="25" border="0"></td> <!--显示删除图标,但不能删除 -->
<% end if
end if
rs_user.movenext
%>
</tr>
<%next%>
</table>
</form>