日期:2014-05-16 浏览次数:20585 次
<%'转换双字节字符为合法的URL传输字串
function getUrlEncodel(byVal Url)
Dim i,code
getUrlEncodel=""
if trim(Url)="" then exit function
for i=1 to len(Url)
code=Asc(mid(Url,i,1))
If code<0 Then code = code + 65536
If code>255 Then
getUrlEncodel=getUrlEncodel&"%"&Left(Hex(Code),2)&"%"&Right(Hex(Code),2)
else
getUrlEncodel=getUrlEncodel&mid(Url,i,1)
end if
next
end function
%><a href="<%=geturlencodel("/pro/你我nini/file.zip")%>">download</a>