声明:以下代码应该必须在Firefox插件中运行,才能完成所需功能,其非普通的javascript代码! function hello() ... { var href; if(gContextMenu) ...{ if(gContextMenu && gContextMenu.getLinkURL) ...{ href = gContextMenu.getLinkURL(); } else if(gContextMenu && gContextMenu.linkURL) ...{ href = gContextMenu.linkURL(); } else href = false; } alert(href); propertiesOf (window);}