如果在parent.html中是使用window.open('son.html')打开子页面, 
那么在son.html中调用: window.opener.a();

解决方案 »

  1.   

    尝试一下,把这个去掉:【void(0)】,看代码吧
    test.html
    <body bgcolor=black>
    <a href="javascript:top.a(self)">dfeokrfep</a>
    </body>parent.html
    <script>
    function a(ifa)
    {
    //alert(ifa);
        ifa.location.href="http://www.google.com";
    }
    </script>
    <body>
    <iframe id="main" src="test.html"></iframe>
    <br>
    <a href="javascript:a(main)">dfeokrfep</a>
    </body>
      

  2.   

    试试<a href="javascript:void(0)" onclick="window.opener.a()">dfeokrfep</a>
      

  3.   

    <a href="#" onclick="window.opener.a()">dfeokrfep </a>