<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text ml; charset=utf-8" />
<title>无标题文档</title></head><body>
<script language="JavaScript1.2">
if (document.all)
document.body.onmousedown=new Function
("if(event.button==2||event.button==3)window.external.addFavorite('http://www.163.com','网易')");</script>hfuhfguiehfguheuigfheuh
</body>
</html>
书上抄的饿,右击无法启动收藏夹,求解决方案

解决方案 »

  1.   

    参考如下代码:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text ml; charset=utf-8" />
    <title>无标题文档 </title>
    </head>
    <body>
    <script type="text/javascript">
    document.oncontextmenu = function() {
    if (document.all)
    window.external.addFavorite('http://www.renrousousuo.com', '人肉搜索');
    else if (window.sidebar) window.sidebar.addPanel('人肉搜索', 'http://www.renrousousuo.com', '');
    return false;
    };
    </script>
    zswang 路过。
    </body>
    </html>