For I=1 To Len(URL)
C=Mid(URL,I,1)
Code =Asc(C)
If Code<0 Then Code = Code + 65535
If Code>255 Then
getURL = getURL & "%"&Left(Hex(Asc(C)),2) & "%"&Right(Hex(Asc(C)),2)
Else
getURL = getURL & C
End If
Next
End Function
%>
<a href="<%=getURL("http://192.168.100.84/职教档案/天津职教/呼叫中心宣传资料.ppt"%>">下载</a>
function unicodeFromUtf8(strUtf8)
{
var bstr = "";
var nTotalChars = strUtf8.length; // total chars to be processed.
var nOffset = 0; // processing point on strUtf8
var nRemainingBytes = nTotalChars; // how many bytes left to be converted
var nOutputPosition = 0;
var iCode, iCode1, iCode2; // the value of the unicode.
while (nOffset < nTotalChars)
{
iCode = strUtf8.charCodeAt(nOffset);
if ((iCode & 0x80) == 0) // 1 byte.
{
if ( nRemainingBytes < 1 ) // not enough data
break;