哪位朋友帮忙看一下。
JS如果取父窗口路径?
a.html<html>
<body>
<IFRAME src="http://127.0.0.1/b.html" frameBorder=0  width="100%" scrolling="no" height="25"  ></IFRAME>
</body>在b.html文件里JS如何取到a.html的实际路径?
也就是说,b.html想知道到底是谁iframe它了。谢谢。
 

解决方案 »

  1.   

    js 得到实际路径不知道 
    window.perent 在b里面这样用表示a页面
    路径等待高手
      

  2.   

    我用这个,window.parent.location.value;
    值是undefined这个版有专家吗?
      

  3.   


    window.parent.location.href
      

  4.   

    提示错误: Permission denied
    代码:
    document.getElementById("urls").href="/user/login.asp?url="+window.parent.location.href;
      

  5.   

    var parentPath = window.parent.location.href;  //获取父窗体路径