我用 window.top.location.href 和 parent.location.href 测试都提示没有权限

解决方案 »

  1.   

    如果iframe中包含的页面是同一个站点的页面用top.location.href就没有问题.
    否则就提示没有权限
      

  2.   

    在父窗体上myhref=document.location.href
    document.write('<iframe id="I1" src="xxx.asp?myhref='+myhref+'>浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe>)
      

  3.   

    在父窗体上myhref=document.location.href
    document.write('<iframe id="I1" src="xxx.asp?myhref='+myhref+'>浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe>')掉了个标点
      

  4.   

    alert(window.parent.location) 难道不行?
      

  5.   

    to cxz7531(大花猫) :运行提示:拒绝访问