zoukankan      html  css  js  c++  java
  • js模块化

    //blog.js
    var blog = {};//初始化命名空间

    blog.utility =
    {
        Version : 'blog.utility version 0.0.1',
        sayHello: function (str)
        {
            alert('hello : '+str +' by ' + this.getVersion());
        },
        getVersion :function ()
        {
             return this.Version;
        }
    }

    //////////////////////////
    //color.js
    var color = {};//初始化命名空间

    color.utility=
    {
        Version : 'color.utility version 0.0.1',
        sayHello: function (str)
        {
            alert('hello : '+str +' by ' + this.getVersion());
        },
        getVersion :function ()
        {
             return this.Version;
        }
    }

    ////////////////////////
    //调用
    with (color.utility)
    {
        sayHello('fzg');
        alert(getVersion());
    }

    with (blog.utility)
    {
        sayHello('abc');
    }
  • 相关阅读:
    195
    194
    193
    192
    191
    190
    Oracle 11g使用rman从单实例迁移到RAC
    RESTful API 设计指南
    Oracle GoldenGate(OGG)- 超级详细
    【转】Oracle GoldenGate OGG管理员手册
  • 原文地址:https://www.cnblogs.com/0000/p/1531685.html
Copyright © 2011-2022 走看看