在<a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(document.location.host);event.returnValue=false;">设为首页</a> 运行时
出现 Microsoft JScript runtime error: Permission denied 错误!
不明白,高手帮忙解决一下!

解决方案 »

  1.   

    <span onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.cnzz.cc');" style="CURSOR: hand">设为首页</span>
     
    a标签不需要.
      

  2.   

    <a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(document.location.href);event.returnValue=false;">设为首页 </a>不是host,改成 href;如果只是把站点设为首页:
    <a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('htt'+'p://'+document.location.host); event.returnValue=false;">设为首页 </a>
      

  3.   

    document.location.host估计这个有问题,换成你想要的网址试一试。