Home > Web Front-end > JS Tutorial > body text

html reads text file content_javascript skills

WBOY
Release: 2016-05-16 19:20:22
Original
977 people have browsed it


<script> <BR>Function bytes2BSTR(vIn) <BR> strReturn = "" <BR> For i = 1 To LenB(vIn) <BR> ThisCharCode = AscB(MidB(vIn,i,1)) <BR> If ThisCharCode < &H80 Then <BR> strReturn = strReturn & Chr(ThisCharCode) <BR> Else <BR> NextCharCode = AscB(MidB(vIn,i+1,1)) <BR> strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) <BR> i = i + 1 <BR> End If <BR> Next <BR> bytes2BSTR = strReturn <BR>End Function <BR></script> <script> <BR>var xmlUrl = new ActiveXObject('Microsoft.XMLHTTP'); <BR>xmlUrl.Open('GET','1.txt'); <BR>xmlUrl.Send(); <BR>setTimeout('alert(bytes2BSTR(xmlUrl.ResponseBody))',2000); <BR></script>
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template