1:添加注冊表:HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/MenuExt/<Menu Text> 設置默認值為html文件路徑,添加值Contexts為)0xf3.
2:code : 在MSDN http://msdn.microsoft.com/en-us/library/aa753589(v=VS.85).aspx中有所講解。MSDN原文:Set the default value of the key to the URL of the page that contains the script you want the context menu entry to execute. This script can obtain the parent window object, the screen where the context menu item was executed, from the menuArguments property of the external object.
大概就是說我們可以用window.external.menuArguments這個對象獲取到內部的信息,如window,document這些常用的對象。所以我們就可以馬上開工了,三下五去二不幾分鐘就搞定(代碼很簡單就直接Code了):
新聞熱點
疑難解答