这样好像是整个页面成了do.asp了,我用iframeid.location.href='do.asp';也是这样,我只想让iframe内的网页是'do.asp'怎么办?

解决方案 »

  1.   

    因为你使用的是iframe而不是frame所以你因该这样:
    iframeid.src='do.asp';不知道能否满足你的要求-----
      

  2.   

    重定义 location.reload()函数iframeid.location.reload=function(){iframeid.location.href='do.asp'}
      

  3.   

    iframe好像没有location属性吧?
      

  4.   

    iframeid.location.reload=function(){self.frames["iframeid"].location.href='do.asp'}
      

  5.   

    self.frames["iframeid"].location.reload=function(){self.frames["iframeid"].location.href='do.asp'}
      

  6.   

    document.getElementById('iframeid').location=document.getElementById('iframeid').location.href.split('?')[0]或者:
    document.getElementById('iframeid').src='do.asp'
      

  7.   

    iframeid.location.href = iframeid.location.pathname;/***********************************
    如果url=http://www.revival.com.cn/test.asp?id=xxx&class=yyy
    location.pathname //返回test.asp
    location.search //返回?id=xxx&class=yyy
    ************************************/
      

  8.   

    document.frames.iframeid.location = document.frames.iframeid.location.pathname;
      

  9.   

    iframe的name属性值.location.href="do.asp";
      

  10.   

    starwu(星沉海底) 的方法比较好