JoinChar 向地址中加入 ? 或 & 用于实现传参
发布时间:2016-12-29 来源:查字典编辑
摘要:'**************************************************'函数名:JoinChar'作用:向地...
'**************************************************
'函数名:JoinChar
'作用:向地址中加入?或&
'参数:strUrl----网址
'返回值:加了?或&的网址
'**************************************************
functionJoinChar(strUrl)
ifstrUrl=""then
JoinChar=""
exitfunction
endif
ifInStr(strUrl,"?")<len(strUrl)then
ifInStr(strUrl,"?")>1then
ifInStr(strUrl,"&")<len(strUrl)then
JoinChar=strUrl&"&"
Else
JoinChar=strUrl
endif
Else
JoinChar=strUrl&"?"
endif
Else
JoinChar=strUrl
endif
endfunction