JavaScript高级程序设计学习笔记-20160125

第8章  BOM

1、location对象

    1.1查找字符串参数->利用location.search

     1.2位置操作 

         window.location.href="URL"等价于location.assign("URL")

         可以通过hash、search、hostname等属性改变URL

         location.replace("URL"),用户不能回到前一个页面

         location.reload()  //可能从缓存加载

         location.reload(true)  //从服务器重新加载

2、navigator对象->提供与浏览器相关的信息

3、screen对象->保存与客户端显示器相关的信息

4、history对象

    history.go(1);   history.go("url")   history.back();    history.forward();

     history.length==0  //打开的第一个页面

       

猜你喜欢

转载自blog.csdn.net/helixue2012/article/details/50581795