zoukankan      html  css  js  c++  java
  • js_浏览器对象

    1. 浏览器对象

    window

    • window对象不但充当全局作用域,而且表示浏览器窗口
      • 所有全局js对象,函数和变量自动成为window对象的成员
      • 全局变量时window对象的属性
      • 全局函数是window对象的方法  
    • innerWidth : 浏览器内部宽度。 innerHeight :浏览器内部高度
    • outerWidth / outerHeight  整个浏览器的宽高

    navigator

    • 表示浏览器信息
    • navigator.appName :  浏览器名称
    • navigator。appVersion : 浏览器版本
    • navigator.language : 浏览器设置的语言
    • navigator.platform : 操作系统的类型
    • navigator.userAgent : ua

    screen

    • screen.width : 屏幕宽度
    • screen.height : 屏幕高度
    • screen.colorDepth : 返回颜色位数

    location : 当前页面的url信息 

    • location.href
    • location.protocol
    • location.host
    • location.port
    • location.pathname
    • location.search
    • location.hash

    document

    • 表示当前页面,是整个dom的根结点
    • document.title  
    • document.getElementById()
    • document.getElementTagName()  
    • document.cookie  ; 'v=123; remember=true; prefer=zh'

    history

    • history.back()  后退
    • history.forward()  前进
    •           
  • 相关阅读:
    Jsp数据交互
    java生成验证码
    http状态码
    Java设计模式之单例
    QQ数据库管理
    Mysql中的存储过程,事物
    mysql中约束的添加,修改,与删除
    mysql中定义存储过程
    Mysql中的子查询等操作
    数据库的简单操作
  • 原文地址:https://www.cnblogs.com/zhangjian0092/p/11792030.html
Copyright © 2011-2022 走看看