window的子对象


在控制台输入


history
history.length 历史记录个数
history.back() 后退
history.forward() 前进
history.go(n) 跳到某一页,可正可负,当n是o时刷新页面


location
window.location;
location.href:可更改地址
location.search:查询数据
location.hash:返回锚点
location.reload(true/false):重新刷新页面,true不走缓存,false走缓存。默认不走缓存
location.assign()括号内为空,刷新页面

navigator

   Navigator 对象包含有关浏览器的信息。

  appName 返回浏览器的名称。

  appCodeName 返回浏览器的代码名称的字符串。

  cookieEnabled 指明浏览器中是否启用 cookie 的布尔值。

  platform 返回运行浏览器的操作系统平台。

  appVersion 返回浏览器的平台和版本信息。

  userAgent-- 用户代理头的字符串表示

 

  Screen 

  Screen 对象包含有关客户端显示屏幕的信息。

  height 返回显示屏幕的高度。 width 返回显示器屏幕的宽度。

  availHeight 显示屏幕的可用高度 (除 Windows 任务栏之外)。

  availWidth 显示屏幕的可用宽度 (除 Windows 任务栏之外)。




posted @ 2019-08-25 19:59  菜鸟小何  阅读(973)  评论(0编辑  收藏  举报