查看完整版本: 按滑鼠右鍵即自動 logout

yore 2005-11-14 11:06 PM

按滑鼠右鍵即自動 logout

[code]<script language="JavaScript">

var message="請在此輸入自己的訊息~";

function LogTo (link)
  {
  var new_url=link;
  if (  (new_url != "")  &&  (new_url != null)  )
      window.location=new_url;
}
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
LogTo('http://www.xanga.com/logout.aspx')
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
LogTo('http://www.xanga.com/logout.aspx')
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</script>[/code]

var message="[color=red]請在此輸入自己的訊息~[/color]";   紅色部分可以更改~

king675 2005-11-15 07:39 PM

唔係好明~~
唔敢~~亂試~~
請詳細~~

LittleDolphin 2005-11-28 03:54 PM

小若:
1. 請問為什麼要 handle mouse down event,而不直接 handle OnContextMenu event 呢。
2. 請問 OnContextMenu event 能否應用在 Netscape 和 Firefox 之上。
3. 那方法很狠啊。 ^^"

king675:
重點是這句:
[code]window.location=new_url;[/code]
原理就好像自動轉址一樣。

AJ~ 2005-12-3 12:11 AM

點解打唔到中文既
彈左d亂碼wor~~

littleemm 2006-7-12 08:55 PM

好可愛呀!!!
但係整左好似好衰bor-_-

joey_niki 2006-12-24 09:58 AM

-\/\/-""
LOGOUT*
NOT SO GD@

小怡`` 2007-2-13 11:22 PM

LOGOUT係封鎖定登出em024 ?
如果係登出既話對我好有用em016
頁: [1]
查看完整版本: 按滑鼠右鍵即自動 logout