|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
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++){ var im=""; if(id(0).text!="k") im="<img src=../jy/face/1.gif width=12 height=12>"; xx=xx+im+"<font color=red onclick=sqq(\\\'"+uid(i).text+"\\\',\\\'"+id(i).text+"\\\') style=\\\'cursor:hand\\\' title=\\\'"+sex(i).text+"\\\'>"+uid(i).text+"</font><br>"; } disonline.innerHTML=xx; window.setTimeout("online()",3000); } } </script> <!--这个"resfresh4.asp"是用于当有自己的信息时弹出QQ对话框用的--> <iframe src="refresh4.asp" width=0 height=2 marginwidth=0 marginheight=0 frameborder=0> </iframe> <input type=button value=" 在线网友:" class=ddyinput2> <div id=disonline style="height:230;overflow: auto"></div><br> <!--这里用到了scriptlet技术,你也可以试一下,和include差不多--> <OBJECT data=i11.htm height=14 style="HEIGHT: 93px; WIDTH: 770px" type=text/x-scriptlet width=14 VIEWASTEXT></OBJECT> </BODY> </HTML> 好了,第一部分就到这里了!! 返回类别: 教程 上一教程: ASP实现对新闻的分页例子 下一教程: 统计在线人数、每日访问人数和总人数 您可以阅读与"一个基于WEB的QQ程序 1(XML+ASP)"相关的教程: · 一个基于WEB的QQ程序 2(XML+ASP) · 一个基于web的QQ程序 2(xml+asp) · 发送信息页面SEND.ASP--基于WEB的QQ程序3 · 显示页面SHOW.ASP--基于WEB的QQ程序1 · 显示页面show.asp--基于web的QQ程序1 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |