<script   type="text/javascript"> 
function   booksite(title,url){ 
if   (document.all) 
window.external.AddFavorite(url,title); 
else   if   (window.sidebar) 
window.sidebar.addPanel(title,url,   "") 

</script>   
<a   href="javascript:booksite('名字名字名字',   'http://www.地址.com')"> 加入收藏 </a>

解决方案 »

  1.   


    刚才试了下window.external.addFavorite('http://127.0.0.1','Page');  在IE7下没有问题,不会出现 “找不到元素 ” 这个问题。
      

  2.   

    IE6、IE7 的“加入收藏”代码:window.external.addFavorite(sURL, sTitle);
      

  3.   

    Steps to follow are;1. Open up the Registry editor - type regedit on command prompt. 2. Look for the key shown belowHKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32 3. Click on the "Default" row and see the value there. If it's value is "C:\WINDOWS\system32\shdocvw.dll", then that is what causes the above mentioned issue. If you have installed Windows in a different drive; C:\ must be replaced with the that letter. 4. Replace that value with "C:\WINDOWS\system32\ieframe.dll". 5. Now restart IE7, and load your GWT application.来源:http://www.cnblogs.com/jimmydm/archive/2009/05/15/1457932.html