我有一个包含网站主导航菜单的包含文件。我希望能够为当前页面设置一个 CSS 类。到目前为止,这是我能够汇总的内容:
public function GetFileName()
Dim files, url, segments, current
'get then current url from the server variables
url = Request.ServerVariables("path_info")
segments = split(url,"/")
'read the last segment
url = segments(ubound(segments))
GetFileName = url
end function
if GetFileName = "index.asp" then
current = "current"
else
current = ""
end if
我认为 Select Case 语句将是在这种情况下使用的东西,我只是不确定如何构建它?提前致谢!