The Browser Object Model(BOM) is based on the window object, which represents the browser window and the viewable page area. The window object doubles as the ECMAScript Global object, so all global variables and functions become properties of it, and all native constructors and functions exist on it initially. This chapter discussed the following elements of the BOM:

  • When frames are used, each frame has its own window object and its own copies of all native constructors and functions. Each frame is stored in the frame collection, indexed both by position and by name.
  • To reference other frames, including parent frames, there are several window pointers.
  • The top object always points to the outermost frame, which represents the entire browser window.
  • The parent object represents the containing frame, and self points back to window.
  • The location object allows programmatic access to the browser's navigation system. By setting properties, it's possible to change the browser's URL piece by piece or altogether.
  • The replace() method allows for navigating to a new URL and replacing the currently displayed page in the browser's history.
  • The navigator object provides information about the browser. The type of information provided depends largely on the browser being used, though some common properties, such as userAgent, are available in all browsers.

  Two other objects available in the BOM perform very limited functions. The screen object provides the information about the client display. This information is typically used in metrics gathering for web sites. The history object offers a limited peek into the browser's history stack, allowing developers to determine how many sites are in the history stack and giving them the ability to go back or forward to any page in the history.

BOM Summary P268-P269的更多相关文章

  1. 酷狗 KRC 文件的解析

    清理硬盘发现以前写过一个进行一半的代码,这次补全并从硬盘删掉. 格式说明来自 https://shansing.com/read/392/ krc解码并解压缩后得到一个字符串,例子: [id:$000 ...

  2. MES总结:CBF.Common 文件Net下的有类型转换

    MES总结:CBF.Common 文件Net下的有类型转换. using System.Text;using System.Data;using System.ComponentModel;using ...

  3. entity framework core 支持批量插入,值得期待

    entity framework6.x之前搞了这么多版本,构架这么牛B,居然没有批量插入更新的功能,但有很多替换的解决方案,例如Entity Framework Extended Library(ht ...

  4. 如何检测或判断一个文件或字节流(无BOM)是什么编码类型

    前言: 昨天,在文章:终于等到你:CYQ.Data V5系列 (ORM数据层,支持.NET Core)最新版本开源了 中, 不小心看到一条留言: 然后就去该地址看了一下,这一看,顺带折腾了一天. 今天 ...

  5. Summary of Critical and Exploitable iOS Vulnerabilities in 2016

    Summary of Critical and Exploitable iOS Vulnerabilities in 2016 Author:Min (Spark) Zheng, Cererdlong ...

  6. HTML BOM Browser对象

    BOM:Browser Object Model,即浏览器对象模型,提供了独立于内容的.可以与浏览器窗口进行互动的对象结构. Browser对象:指BOM提供的多个对象,包括:Window.Navig ...

  7. 一步步学习javascript基础篇(7):BOM和DOM

    一.什么是BOM.什么是DOM BOM即浏览器对象模型,主要用了访问一些和网页无关的浏览器功能.如:window.location.navigator.screen.history等对象. DOM即文 ...

  8. BOM,DOM,ECMAScripts三者的关系

    一:DOM 文档对象模型(DOM)是表示文档(比如HTML和XML)和访问.操作构成文档的各种元素的应用程序接口(API) DOM是HTML与JavaScript之间沟通的桥梁.   DOM下,HTM ...

  9. javascript学习之BOM

    BOM是browser object model的缩写,简称浏览器对象模型.先看看下面这张图 window对象是BOM的顶层(核心)对象,所有对象都是通过它延伸出来的,也可以称为window的子对象. ...

随机推荐

  1. dedecms织梦系统后台验证码图片不显示的解决方法

    网站迁移后,dedecms织梦系统后台验证码图片不显示的解决方法通用解决方案-取消后台验证码功能因为没有验证码,不能进后台,所以修改php文件源代码:方法一:打开dede/login.php 找到如下 ...

  2. java8学习之Supplier与函数式接口总结

    Supplier接口: 继续学习一个新的函数式接口--Supplier,它的中文意思为供应商.提供者,下面看一下它的javadoc: 而具体的方法也是相当的简单,就是不接受任何参数,返回一个结果: 对 ...

  3. mysql 导入sqlserver数据库

    #mysql 导入sqlserver数据库 EXEC master.dbo.sp_addlinkedserver @server = N'sjkxb00', @srvproduct=N'MySQL', ...

  4. bind(named)配置文件

    BIND是DNS协议的一种实现.BIND包含了一个DNS Server(服务名叫named),用来解析主机名到ip地址:一个解析库:一些辅助工具,还有一个安全目录工具,分别属于下面几个包: 下面是原配 ...

  5. Redis主从复制配置+哨兵模式

    架构设计: master:s0 slave:s1.s2 主机映射信息如下: 192.168.32.100 s0 192.168.32.101 s1 192.168.32.102 s2 1.安装Redi ...

  6. CentOS7 安装 RocketMQ 实践和小示例

    CentOS7 安装 RocketMQ 实践和小示例 1.通过 SSH 工具(比如 XShell)连接到 CentOS7 服务器上: 2.进入到 /usr/local 目录中: cd /usr/loc ...

  7. BZOJ 3594: [Scoi2014]方伯伯的玉米田 (二维树状数组优化DP)

    分析 首先每次增加的区间一定是[i,n][i,n][i,n]的形式.因为如果选择[i,j](j<n)[i,j](j<n)[i,j](j<n)肯定不如把后面的全部一起加111更优. 那 ...

  8. BFS解决九宫重排问题

    问题 1426: [蓝桥杯][历届试题]九宫重排 时间限制: 1Sec 内存限制: 128MB 提交: 215 解决: 47 题目描述 如下面第一个图的九宫格中,放着  1~8  的数字卡片,还有一个 ...

  9. 『HGOI 20190917』Cruise 题解 (计算几何+DP)

    题目概述 在平面直角坐标系的第$1$象限和第$4$象限有$n$个点,其中第$i$个点的坐标为$(x_i,y_i)$,有一个权值$p_i$ 从原点$O(0,0)$出发,不重复的经过一些点,最终走到原点, ...

  10. noi.ac #535 生成树

    题目链接:戳我 我们考虑按照编号依次加点,然后维护一个栈. 预设生成树的颜色为color. 对于当前点x,如果它和栈首的点连边颜色相同,那么他们的连边可以作为生成树上面的边,点i已经连接,直接brea ...