if(parent.location.href=="http://www.163.com/aaa.html")
{
 //do something
}

解决方案 »

  1.   

    if(parent.location == "http://www.163.com/aaa.html")
       alert("我要是这个链接!");
      

  2.   

    1.parent.htm<body>
    <script language="JavaScript">

    </script>
    <iframe name="1.htm" src="1.htm" width="300" height="200"></iframe>
    <!--将只保存test.htm-->
    </body>2.1.htm<html>
    <head>
    <meta http-equiv="Content-Type" content="application/msword" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head>
    <body>
    <script>
      alert(parent.document.location.href);
    </script>
    </body>
    </html>