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 閱讀(420) 評論(0)  編輯  收藏 所屬分類: JAVA

          主站蜘蛛池模板: 牡丹江市| 五原县| 洛宁县| 务川| 上饶县| 神木县| 黄龙县| 澜沧| 门源| 左贡县| 武胜县| 五原县| 新竹市| 岳普湖县| 日土县| 栾城县| 安庆市| 新兴县| 房产| 北宁市| 武平县| 临高县| 姚安县| 台南县| 吴江市| 响水县| 安吉县| 华容县| 建始县| 县级市| 寻甸| 台东县| 永靖县| 临漳县| 安龙县| 炎陵县| 察哈| 广饶县| 达孜县| 龙泉市| 城步|