document.iframemain.location=homepage;

解决方案 »

  1.   

    document.frames['main'].location.replace("../../index.html") //没事干吗用replace?
    ==>
    document.frames['main'].location.href = "../../index.html"
      

  2.   

    我试了一下,可以呀.看看index.html的位置,应该是整个frame的相对位置,不是iframe的
      

  3.   

    我的意思就是不使用当前路径下的html文件,如当前Frames主页在/ssss/frame.html下,
    而我想能过javascript 方法如:
    function test()
      {
          document.iframe.main.location.replace("/nnnnn/index.html");
      或  document.iframe.main.location.href (("/nnnnn/index.html");
      }
    IE还是会提示是当前目录中没有这个对象.
    如果改成是当前目录的文件就可以 如
    document.iframe.main.location.replace/ssss/test.html");
    请问是不是不在IFrame中不能改变当前路径啊!
      

  4.   

    不可能!看看你要调用的文件和iframe所在文件的相对位置!