码迷,mamicode.com
首页 > 其他好文 > 详细

BOM

时间:2018-11-12 20:25:00      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:web   The   字符   reload   左右   navig   mode   war   tar   

一 BOM >>> brower objects model

window: frames[]::  框架

    histore : 历史记录

    location 本地信息>>> 浏览器地址栏的内容

    navigator::  获取客户端属性

    screem :  ,屏幕,显示

    DOM:   document:  anchors[]   锚点 (超链接)

               forms[] :表单

             applets: []Applet 是一种 Java 程序。它一般运行在支持 Java 的 Web 浏览器内。因为它有完整的 Java API支持,所以Applet 是一个全功能的                                 Java 应用程序。

             images[] : 图片

             areas[] :区块

             layers [] : 层

             embeds[] : 嵌套

             links[] :外链

 

二 window对象是js中的顶级对象 

  Window方法:  alert   confirm   prompt   open ("链接",  打开方式(target)(-self/ _blank....))

        .close() #关闭页面

             

三 location: 可以将URL解析成独立的片段

  方法: href 跳转

     hash  返回url中 # 后面的内容, 包含#

      host :  主机名 +端口号

        hostname : 主机名

       pathname:  url中路径部分,   (如www.baidu.com/ a   >>>a部分 )

     protocol: 协议  (http://   https://    等)

       search  : 查询字符串

   for E   : href    location.href =  "http://www.baidu.com/";    在当前页面打开百度

      location.reload() #重新加载页面

四  : nabigator对象

   userAgent: 系统+ 浏览器信息

  platform:  浏览器支持的系统, win/mac/linux

 

五 history:  历史

  1: 后退: history.back()

    history.go(-1):0   >>> 0是刷新

  2前进:  history.forward()

       history.go(1)

 

 

六 其他:   client (DOM对象属性)  :   object.clientTop :  内容区域(包括padding)  到边框顶部的距离,   上boder-top 的宽度            

                  .clientLeft:  左边边框的宽度

                  .clientWidth:   内容区域+左右padding:  可视宽度

                  .clientHeitght: 内容区域+上下padding:  可视高度

    

    onresize:  窗口发生大小变化事件

 

    offset : Dom对象,  object.offsetTop:   如果盒子没有设置定位,  到body的顶部的距离,   如过有定位,  就是magin-top

               offsetWidth:  占位宽>>内容加paddind+boder

               offsetHeight: 占位高 ,  padding + height +boder

               offserLeft:  如果没有设置定位, magin-left  到body   若果有定位, 以父辈盒子为准

 

     scroll  : scrollTop:    页面卷起的高度

        scrollLeft:  页面卷起的左侧

        scrollWidth:  页面卷起的宽度

        scrollLeftHeight: height+ paddiong 不含边框  滚定监听是发生变化

 

BOM

标签:web   The   字符   reload   左右   navig   mode   war   tar   

原文地址:https://www.cnblogs.com/tcpblog/p/9948748.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!