ÁöµM Netscape Navigator ªº³\¦h¼ÐÅÒ¥i¥H¶¶§Q¦¬¨ì mousedown event¡A
¦P®É°t¦X "return false;" Script ±Ôz¨Ï¥Î¡A´N¯à¨ú®øÂsÄý¾¹ popup menu ªº°Ê§@¡A
°ÝÃD¬O·Æ¹««öÁ䦳¤À¥ª¥k¡A¦pªG§ÚÌ¥un¦¬¨ì mousedown ´N return false;
¨º¤£ºÞ¨Ï¥ÎªÌ¥ªÁä©Î¥kÁä¡A³£·|³Q¨ú®ø°Ê§@¡A¨º´N¤£¬O¨ú®ø popup menu ¡A¦Ó¬O®Ú¥»
¼o¤F·Æ¹«ªºªZ¥\¤F¡C©Ò¥H¦b mousedown event ®É¡A§ÚÌ¥²¶·ª¾¹D¨Ï¥ÎªÌ«öªº¬O¥ªÁäÁÙ¬O
¥kÁä¡A¦Ó NN ªº¿ìªk´N¬O¨Ï¥Î window ª«¥óªº captureEvents() ¤èªk¡C©Ò¿×
captureEvents ´N¬O·íºô¶¤Wªº¼ÐÅÒª«¥óµo¥Í¬Y¨Æ¥ó®É¡A§â·í®Éªº·Æ¹«¤ÎÁä½Lªº
¬ÛÃö°Ê§@¸ê°T«O¯d¤U¨Ó¡A¤£¦Aª½±µ¥æµ¹ì¨Æ¥ó²£¥Íª«¥ó³B²z¡A¦Ó¬OÂà¥Ñ
window ª«¥ó«ü©wªº¨ç¦¡¨Ó³B²z
¡A¨Ò¦p¡G
/* ¥Ñ window ª«¥ó¨ÓÄdºI©Ò¦³ºô¶ªº onmousedown ¨Æ¥ó¡A½Ðª`·N¤j¤p¼g¡C */
window.capetureEvents(Event.MOUSEDOWN);
/* «ü©w·í window µo¥Í onmousedown ¨Æ¥ó®Én°õ¦æªº¨ç¦¡¡A½Ðª`·N¨ç¼Æ¦WºÙ«á
¤@©w¤£n¥´ "()" ¦r²Å¡C */
window.onmousedown=MouseDownHandle;
/* ·í onmousedown ¨Æ¥óµo¥Í®Én°õ¦æªº¨ç¦¡¡A°Ñ¼Æ mouse t³d±µ¦¬ÂsÄýªÌ¾Þ§@¸ê°T¡C */
function MouseDownHandle(mouse)
{
/* which ÄݩʰO¿ý¤F·Æ¹««öÁä¸ê°T */
alert(mouse.which);
/* which==3 ªí¥ÜÂsÄýªÌ«ö¤F·Æ¹«¥kÁä */
if (mouse.which==3)
/* ¨ç¦¡¶Ç¦^°°Èªí¨ú®øÂsÄý¾¹±µµÛnIJµoªº¹w³]°Ê§@ */
{return false;}
}
¸g¹L¦p¦¹¤@µf³]©w«á¡A¦pªG§A²{¦b¥¿¥Î NS ÂsÄý¥»ºô¶ªº¸Ü¡A½Ð«ö
³oùØ¡C