📄 duty_function.asp
字号:
<%'=====================返回指定部门数组
function DutyArray(DutyName)
dim rs
set rs=server.CreateObject("adodb.recordset")
sql=" SELECT n_ID, v_duty, "&_
" (case v_duty when '"& DutyName &"' then 'selected' else '' end) as state "&_
" FROM hxdf_duty_form "&_
" WHERE v_duty like '%"& Duty &"%'"&_
" ORDER BY v_duty"
rs.Open sql,conn,1,1
if not rs.EOF then
rstree=rs.GetRows
else
rstree=null
end if
rs.Close: set rs=nothing
DutyArray=rstree
end function
'======================
sub DutySelect(DutyArrayName, Way)
for i= 0 to ubound(DutyArrayName,2)
if Way="ID" then
response.Write ("<option value='"& DutyArrayName(0,i) &"' "& DutyArrayName(2,i) &">")
elseif Way="Name" then
response.Write ("<option value='"& DutyArrayName(1,i) &"' "& DutyArrayName(2,i) &">")
end if
response.Write (DutyArrayName(1,i))
response.Write ("</option>")
next
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -