JoinChar 向地址中加入 ? 或 & 用于实现传参

  '**************************************************

  '函数名:JoinChar

  '作  用:向地址中加入 ? 或 &

  '参  数:strUrl  ----网址

  '返回值:加了 ? 或 & 的网址

  '**************************************************

  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