【xmlhttprequest】XMLHTTP反回中文乱码问题

时间:2014-11-15  来源:中文酷站  阅读:

XMLHTTP反回中文乱码问题:

方法一php

   header("Content-type:html/text;charset=utf-8");

方法二asp

response.charset="gbk";

方法三,用asp是才用.

<script language="VBScript">
  Function bdBytes2Str(vIn)
    dim strReturn
    dim i
    dim ThisCharCode
    dim NextCharCode
          strReturn = ""
          For i = 1 To LenB(vIn)
        ThisCharCode = AscB(MidB(vIn,i,1))
               If ThisCharCode < &H80 Then
          strReturn = strReturn & Chr(ThisCharCode)
               Else
          NextCharCode = AscB(MidB(vIn,i+1,1))
          strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
          i = i + 1
               End If
           Next
    bdBytes2Str = strReturn
        End Function
</script>

【xmlhttprequest】XMLHTTP反回中文乱码问题

http://m.bbyears.com/kuzhan/10752.html

推荐访问:xmlhttprequest对象
相关阅读 猜你喜欢
本类排行 本类最新