当前位置: 首页 > 图文教程 > 网络编程 > ASP > 一个基于web的QQ程序 1(xml+asp)

ASP
asp中利用数组实现数据库记录的批量录入方法
vbs(asp)的栈类
加密處理使密碼更安全[CFS編碼加密]
在asp中通过vbs类实现rsa加密与解密
披著羊皮的大野狼 - Session
简体中文编码对应器
len(),lift(),right()不能正常识别中文的解决方法
实现WEB中的@虚拟域名系统(原理篇)
巧用ASP生成PDF文件
二级域名原理以及程序,申请即可开通
无组件上传图片到数据库中,最完整解决方案
在ASP中使用SQL语句之1:SELECT 语句
在ASP中使用SQL语句之2:用WHERE子句设置查询条件
在ASP中使用SQL语句之3:LIKE、NOT LIKE和 BETWEEN
在ASP中使用SQL语句之4:联合语句
在ASP中使用SQL语句之5:开始执行
在ASP中使用SQL语句之6:存储查询
在ASP中使用SQL语句之7:ORDER BY
在ASP中使用SQL语句之8:随机数
在ASP中使用SQL语句之9:表单操作

ASP 中的 一个基于web的QQ程序 1(xml+asp)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 185 ::
收藏到网摘: n/a

  refresh.htm
=========
<HTML>
<HEAD>
<title>在线QQ</title>
<link rel="stylesheet" type="text/css" href="forum.css">
</HEAD>
<BODY onload=online() scroll=no topmargin="0" leftmargin="0" style="background-color: #8482C6; color:
#FFFFFF; border: 2 solid #FFFFFF; padding: 0">
<marquee><font color=black>如果关闭此窗口将失去在线QQ功能!</font></marquee>
<!--嘿嘿!!这里引用了ZEE的转换代码,用于解决无法显示汉字的,本来还有一段的不过在俺用的时候,发现加上那一段就不行了,所以去掉了,有兴趣的朋友可以到精华区去找一下zee的文章        -->
<script language="vbscript">
Function bytes2BSTR(vIn)
    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">
var lengt=0;
<!--消除右键功能-->
function no(){
    alert("不支持右键!");
    self.event.returnValue=false;
}
<!--弹出QQ对话框,见后面-->
function sqq(uid,id){
    window.open("sqq.asp?id="+id+"&uid="+uid,"_blank","width=400,height=180");
    }
<!--关键的函数,用于显示在线的会员-->
function online(){
        var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        xmlhttp.open("post","online.asp",false);
        xmlhttp.send();
      var xmldom=new ActiveXObject("Microsoft.XMLDOM");
        xmldom.async=false;
        body=bytes2BSTR(xmlhttp.responseBody);
        xmldom.loadXML(body);
        if(xmldom.parseError.errorCode!=0){
            window.open("refresh2.asp","_self");<!--为了防止有些用户不支持xml,所以用了一个备用的asp版的-->
            return
            }
        else{
        var uid=xmldom.documentElement.selectNodes("uid");
        var id=xmldom.documentElement.selectNodes("id");
        var sex=xmldom.documentElement.selectNodes("sex");
        var xx="";
        lengt=uid.length;
        for(var i=0;i<lengt;i++){
        &nbs