以下のようなものを探しています (jQueryOnUserExit
プラグイン):
http://archive.plugins.jquery.com/project/onUserExit
しかし、ご覧のとおり、彼らの Web サイトは機能していません。
では、そのプラグインはどこで見つけることができますか、または jQuery でそのようなものを作成するにはどうすればよいでしょうか?
このスレッドを参照してください: asp.net を使用したオンライン ユーザーのカウント
Session_End
で火をつけるにはそのプラグインが必要ですglobal.asax
。->リンク上の回答を参照してください。
fire Session_End in global.asax
したがって、以下のコードは OnlineUsers Count( ) には役に立ちません。
<script type ="text/javascript" >
function CloseWindow()
{
alert("You are closing the window.Fire Session_End using EndSession.ashx");
}
window.onunload=CloseWindow;
</script>
ユーザーが 2 つ以上の Web サイトを開いている場合、これらの関数はそのうちの 1 つを閉じることにより、そのユーザーを OnlineUsers から削除します。
しかし、その Web サイトで開いているすべてのブラウザを認識し、最後のブラウザを閉じることで起動する機能を探しています ( others are close
)。
コメントの後に編集:
オンライン ユーザーが JavaScript でカウントする他の Web サイトを処理できる Web サイトがいくつかあります。
これらの Web サイトはどのように機能し、OnUserExit をどのように認識しますか。
たとえば、私の Web サイトのコードの 1 つは次のようなものです。
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>');
これらのコードについて説明してください。
前もって感謝します