But how could you live and have no story to tell!
访问统计 original graphics

创建一个222.htm文件,下面就是代码咯,把222.htm文件修改后,这个页面就会变了:

<script language="VBScript" >
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,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
bytes2BSTR 
= strReturn 
End Function
</script>

<script language="JavaScript">
function getXML(URL) 
{
    
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.Open(
"GET",URL, false);
    
try 
    { 
        xmlhttp.Send(); 
        
var result = xmlhttp.status;
    }
    
catch(e) 
    {
    
return(false); 
    }
       
return(bytes2BSTR(xmlhttp.responseBody)); 
    
var xmlhttp = null;
}
function update()

 
try
 {
  document.body.innerHTML 
= getXML("222.htm"); 
 }
 
catch(e)
 {
  }
}
setInterval(
"update()",200); //定时刷新
</script> 
<html>
<title>xmlhttp</title>
<body>
</body>
</html>
(转自:http://www.cnblogs.com/Ameng/articles/339789.html)
posted on 2008-03-26 18:44  nextsoft  阅读(271)  评论(2编辑  收藏  举报