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

          主站蜘蛛池模板: 东辽县| 和政县| 铜陵市| 怀化市| 恩施市| 海伦市| 连南| 城口县| 曲麻莱县| 肥西县| 云浮市| 冷水江市| 广水市| 胶南市| 沂南县| 东源县| 潢川县| 灌南县| 金乡县| 武陟县| 林口县| 山东| 孝昌县| 琼中| 平潭县| 格尔木市| 华容县| 抚宁县| 错那县| 沧州市| 长宁区| 海南省| 绥德县| 休宁县| 郓城县| 延长县| 寻甸| 天祝| 衡水市| 大同市| 河间市|