显示用户是否在线的方法
2010-7-23编辑:feimeimei
check.asp
script language=javascript
function Test
var xmlhttp = new ActiveXObject;
xmlhttp.open;// 向onceonline.asp发送更新请求
xmlhttp.setRequestHeader;
xmlhttp.send;
setInterval;,10); // 10秒钟发送一次更新请求
/script
online.asp
!#include file=conn.asp
%
conn.Execute update hand_us set i=‘ii‘where h=true and a=‘request.cookies‘ ‘更新最后在线时间
conn.Execute update hand_us set h=falsewhere datediff)1 ‘删除不在线的用户
enddata