zoukankan      html  css  js  c++  java
  • 《javascript高级程序设计》第八章 The Browser Object Model

    8.1 window 对象
      8.1.1 全局作用域
      8.1.2 窗口关系及框架
      8.1.3 窗口位置
      8.1.4 窗口大小
      8.1.5 导航和打开窗口
      8.1.6 间歇调用和超时调用
      8.1.7 系统对话框
    8.2 location 对象
      8.2.1 查询字符串参数
      8.2.2 位置操作
    8.3 navigator 对象
      8.3.1 检测插件
      8.3.2 注册处理程序
      8.4 screen 对象
      8.5 history 对象

    Intervals and Timeouts
    var num = 0;
    var max = 10;
    function incrementNumber() {
            num++;
            //if the max has not been reached, set another timeout
            if (num < max) {
                     setTimeout(incrementNumber, 500);
            } else {
                     alert(“Done”);
            }
    }
    setTimeout(incrementNumber, 500);

    ------------------------------------------------------------------------------------------------------ 查询字符串参数 location对象中(面试有遇到过)

    function getQueryStringArgs(){
            var qs = location.search.length?location.search.substring(1):"";
            var args = {};
            var items = qs.length?qs.split("&"):[],
            item = null,name = null,value = null;
           
            for(var i=0 ; i<items.length; i++){
                name = decodeURIComponent(items[i].split("=")[0]);
                value = decodeURIComponent(items[i].split("=")[1]);
                if(name.length){
                    args[name] = value;
                }
            }
            return args;
        }
        var args = getQueryStringArgs();
        alert(args["var_name"]);
  • 相关阅读:
    Oracle序列使用:建立、删除
    struts1.x入门
    SQL的四种连接-左外连接、右外连接、内连接、全连接
    eclipse更改文件编码方式
    使用links方式安装Eclipse插件
    JAVA:Eclipse代码自动提示
    MyEclipse注释配置
    全面理解SQL
    一秒去除Win7快捷方式箭头
    Eclipse快捷键大全(转载)
  • 原文地址:https://www.cnblogs.com/della/p/3296141.html
Copyright © 2011-2022 走看看