📄 listdept.asp
字号:
<%response.expires=0%>
<!--#include file="asp/opendb.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="VI60_DTCScriptingPlatform" content="">
<title>部门列表</title>
<link rel="stylesheet" type="text/css" href="css/css.css">
<script language="javascript">
function MouseClick(TdID)
{
var UnitName;
DeptName=TdID.innerHTML;
parent.document.form1.DeptName.value=DeptName;
parent.DeptNameTd.innerHTML='部门名称('+DeptName+')';
parent.window("HiddenFrame").location.href="GetDeptName.asp?UnitName="+DeptName;
}
</script>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
<div align="left">
<%
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select DISTINCT userdept from userinf"
rs.open sql,conn,1
if rs.eof and rs.bof then
call DispErrorInfo1("对不起,请先添加收文单位!")
else
i=1
do while not rs.eof
DeptName=trim(rs("userdept"))
%>
<table border="1" cellpadding="0" cellspacing="0" width="190" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
<tr>
<td width="190" height="25" align="center" id="Td<%=i%>" ONMOUSEOVER="this.bgColor='#DEDFF7';this.style.cursor='hand';" ONMOUSEOUT="this.bgColor='#ffffff';" onclick="MouseClick(<%="Td"&i%>)"><%=server.htmlencode(DeptName)%></td>
</tr>
<%
rs.movenext
i=i+1
loop
%>
</table>
<%
end if
set rs=nothing
conn.close
set conn=nothing
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -