functions.asp
来自「商务网站,信息分类,可以搜索加上ACCESS数据库」· ASP 代码 · 共 39 行
ASP
39 行
<%
'============================== getPath(pthid,pnam) ==============================
'功能:返回带超链接的路径
'参数:pthid 用逗号分隔的ID号字符串
' pnam用chr(255)分隔的字符串
'===================================================================================
function GetPath(pthid,pnam,isadm)
dim i
if right(pthid,1) <> "," then pthid = pthid & ","
pthid = split(pthid,",")
pnam = split(pnam,chr(255))
thispath = ""
for i = 0 to UBound(pthid) - 2
if isadm = TRUE then
thispath = thispath & ">><a href=""admshop.asp?sortid=" & pthid(i) & """>" & pnam(i) & "</a>"
else
thispath = thispath & ">><a href=""shop.asp?sortid=" & pthid(i) & """>" & pnam(i) & "</a>"
end if
next
GetPath = thispath & ">>" & pnam(i)
end function
'=================================== getEndID(idlist) ===========================
'功能:返回以逗号分隔的ID字符串列表的最后一个ID,若参数中没有逗号则返回该参数
'参数:idlist 用逗号分隔的ID字符串列表
' idlist 用逗号分隔的数字表
'==================================================================================
function getEndID(idlist)
dim pos
for pos = len(idlist) to 1 step -1
if mid(idlist,pos,1) = chr(44) then exit for
next
if pos < 1 then
getEndID = idlist
else
getEndID = right(idlist,len(idlist) - pos)
end if
end function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?