BOM

BOM 浏览器对象模型
定义了js操作浏览器的属性和方法
open(页面地址的url,打开的方式)
第一个参数,如果为空,默认打开一个空白的页码
第二个参数,如果为空,默认打开一个新的窗口打开





//open的参数  open(页面地址的url,打开的方式) 

//查看window.open()的返回值

alert(window.navigator.userAgent);浏览器的版本
alert(window.location);//还有一些属性
alert(window.location.href);//和上面的一样

//    window.location.search  url?内容
//     window.location.hash   url#内容
alert(window.location.hash);
alert(window.location.search);

你可能感兴趣的:(BOM)