浏览器窗口的尺寸(浏览器的视口,不包括工具栏和滚动条)。(1)、对于Internet Explorer、Chrome、Firefox、Opera 以及 Safari: window.innerHeight - 浏览器窗口的内部高度 window.innerWidth - 浏览器窗口的内部宽度(2)、对于 Internet Explorer 8、7、6、5: document.documentElement.clientHeight document.documentElement.clientWidth或者 document.body.clientHeight document.body.clientWidth window.open() - 打开新窗口 window.close() - 关闭当前窗口 window.moveTo() - 移动当前窗口 window.resizeTo() - 调整当前窗口的尺寸 Window.location 对象用于获得当前页面的地址 (URL),并把浏览器重定向到新 Window.location.href || Window.location.reload 刷新当前页面 location.href 属性返回当前页面的 URL。的页面 location.hostname 返回 web 主机的域名 location.pathname 返回当前页面的路径和文件名 location.port 返回 web 主机的端口 (80 或 443) location.protocol 返回所使用的 web 协议(http:// 或 https://) location.assign() 方法加载新的文档 screen.availWidth 属性返回访问者屏幕的宽度,以像素计,减去界面特性,比如窗口任务栏。 window.history 对象包含浏览器的历史 history.back() - 与在浏览器点击后退按钮相同 history.forward() - 与在浏览器中点击按钮向前相同 window.navigator 对象包含有关访问者浏览器的信息。
转载于:https://www.cnblogs.com/xchlsl/p/4485407.html
相关资源:数据结构—成绩单生成器