sooxin-JAVA

          Where does the target="" go when using location.href=""?

          By default when using location.href="fileName.html", the target is the current document.

          When coding location.href="fileName.html" what we are actually coding is document.location.href="fileName.html" or self.location.href="fileName.html", the self specifies the current window, or window.location.href="fileName.html".

          When we need to target another window we need to navigate the window object hierarchy, either by specifying the parent frame, or the top frame (which may in fact be the same thing).

          top.location.href="fileName.html" targets the top document.

          top.frameName.location.href="fileName.html" targets the frame frameName within the top document.

          parent.location.href="fileName.html" targets the parent of the current document.

          parent.frameName.location.href="fileName.html" targets the child frame frameName of the parent of the current document, i.e. a sibling frame.

          Feedback on 'Q18 Where does the target="" go when using location.href=""?'

          posted on 2007-06-15 17:21 sooxin 閱讀(414) 評論(0)  編輯  收藏 所屬分類: JAVA

          主站蜘蛛池模板: 渑池县| 洛阳市| 辽阳县| 阳江市| 尼玛县| 霸州市| 河北区| 越西县| 北碚区| 安图县| 资溪县| 门源| 太湖县| 清远市| 巴彦淖尔市| 呈贡县| 五寨县| 饶河县| 抚远县| 敖汉旗| 东乡族自治县| 万全县| 苍溪县| 温州市| 黄陵县| 宝丰县| 奇台县| 紫阳县| 吉首市| 鹰潭市| 江陵县| 通榆县| 浮梁县| 吴旗县| 兰溪市| 嘉禾县| 莆田市| 洛扎县| 凤城市| 长泰县| 峨眉山市|