龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > asp编程 >

asp 获取地址栏参数代码

时间:2012-12-31 22:56来源:未知 作者:admin 点击:
分享到:
asp 获取地址栏参数代码 asp 获取地址栏参数代码 '*********************************************** '函数名:JoinChar '作 用:向地址中加入 ? 或 '参 数:strUrl ----网址 '返回值:加了 ? 或 的网址 'pos=
asp 获取地址栏参数代码

asp 获取地址栏参数代码
'***********************************************
'函数名:JoinChar
'作  用:向地址中加入 ? 或 &
'参  数:strUrl  ----网址
'返回值:加了 ? 或 & 的网址
'pos=InStr(1,"abcdefg","cd")
'则pos会返回3表示查找到并且位置为第三个字符开始。
'这就是“查找”的实现,而“查找下一个”功能的
'实现就是把当前位置作为起始位置继续查找。
'***********************************************
function JoinChar(strUrl)
 if strUrl="" then
  JoinChar=""
  exit function
 end if
 if InStr(strUrl,"?")<len(strUrl) then
  if InStr(strUrl,"?")>1 then
   if InStr(strUrl,"&")<len(strUrl) then
    JoinChar=strUrl & "&"
   else
    JoinChar=strUrl
   end if
  else
   JoinChar=strUrl & "?"
  end if
 else
  JoinChar=strUrl
 end if
end function


精彩图集

赞助商链接