好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

window.top.location的作用_html/css_WEB-ITnose

top, 表示是顶层页面, 因为页面之中可能嵌入了 frame 等子页面,top表示最外面一层

Html代码

         function breakout()     {     if (window.top!=window.self)        {       window.top.location="/example/hdom/tryjs_breakout.htm"      }     }                       

就是你的顶层网页页面的地址对象。 比如现在这个百度知道的页面,它的location.href 就是

http://zhidao.baidu测试数据/question/88553493.html

而location, 是一个对象,它包括了上面说的那个地址,还有一些方法,

比如replace(替换地址) 等, 和属性 比如 href (地址)

至于top, 表示是顶层页面, 因为页面之中可能嵌入了 frame 等子页面,top表示最外面一层。

查看更多关于window.top.location的作用_html/css_WEB-ITnose的详细内容...

  阅读:53次