0

我正在寻找类似下面的东西(jQueryOnUserExit插件): http:
//archive.plugins.jquery.com/project/onUserExit

但正如您所见,他们的网站无法正常工作。

那么我在哪里可以找到那个插件,或者我怎样才能用 jQuery 编写类似的东西呢?

请参阅此线程:使用 asp.net 统计在线用户

我需要那个插件来开火Session_Endglobal.asax-> 指的是链接上面的答案。

所以下面的代码对 OnlineUsers Count( fire Session_End in global.asax) 没有用处:

<script type ="text/javascript" >
    function CloseWindow()
    {
       alert("You are closing the window.Fire Session_End using EndSession.ashx");
    }
    window.onunload=CloseWindow;
</script>

因为当用户打开两个或多个网站时,这些功能将通过关闭其中一个来将该用户从 OnlineUsers 中删除。
但正在寻找一个能够识别该网站所有打开的浏览器并通过关闭最后一个(others are close)来触发的功能。

编辑后评论:
有一些网站可以处理其他网站的在线用户数使用 javascript。
这些网站如何工作以及它们如何识别 OnUserExit。
例如,他们在我的网站中的代码之一是这样的:

document.write('<script language="javascript" src="http://www.Counter.com/c.aspx?t=stats&code=2562977&ref=' + escape(document.referrer) + '"></script>'); screensize=screen.width+'x'+screen.height;colors=(navigator.appName.indexOf('Microsoft')==0)?screen.colorDepth:screen.pixelDepth;if(colors=='undefined'){colors='5';};if(colors=='32'){colors='1';};if(colors=='24'){colors='2';};if(colors=='16'){colors='3';};if(colors=='8'){colors='4';};document.write ('<div align="center"><iframe scrolling=no width=125 height=110 border=0 frameborder=0 allowtransparency="true" src="http://engine.Counter.com/counter/xstat.aspx?t=sum1&code=2562977&rnd=' + Math.round(Math.random()*50000) + '&s=' + screensize + '&c=' + colors + '&ref=' + escape(document.referrer) + '&title=' + escape(document.title) + '" ></iframe></div>');

请你给我们一些关于这些代码的解释!

提前致谢

4

0 回答 0