parent.location.hreforparent.location.href.replace(/^.*\/([^\/]+)$/,"$1");

解决方案 »

  1.   

    saucer(思归, MS .NET MVP) 2003-01-30 10:39:00  
    不太好用啊
      

  2.   


    <script>
    alert(this.location.href)
    </script>
      

  3.   

    wocsdn(5636) 2003-01-30 17:27:00  还是不好用啊我用的是document.write也不好用
    单独页面好用
    在frame里就不好用了
      

  4.   

    index.html:
    <frameset cols="0,*" frameborder="NO" border="0" framespacing="0">
    <frame scrolling="NO" noresize>
    <frame src="b.html">
    </frameset>
    b.html:
    <script>
    alert(parent.location.href);
    alert(parent.location.href.replace(/^.*\/([^\/]+)$/,"$1"));
    </script>
      

  5.   

    saucer(思归, MS .NET MVP) 2003-01-30 23:10:00  还是不好用啊?
    你可以去看看
    父页 http://www.7st.net/
    子页 http://jokulE.y365.com/index.html
      

  6.   

    it is security issues, the browser does not allow you access pages from another domain