推荐关注
› Meteor
› JSLint - a JavaScript code quality tool
› jsFiddle
› D3.js
› WebStorm
推荐书目
› JavaScript 权威指南第 5 版
› Closure: The Definitive Guide
sivacohan

这种代码怎么读?在require.js的文档里面看到的

  •  
  •   sivacohan · Apr 1, 2013 · 4293 views
    This topic created in 4936 days ago, the information mentioned may be changed or developed.
    3 replies  •  1970-01-01 08:00:00 +08:00
    sivacohan
        1
    sivacohan  
    OP
       Apr 1, 2013   ❤️ 1
    怎么贴gist啊?搞不清楚了
    zythum
        2
    zythum  
       Apr 1, 2013   ❤️ 1
    这里面的this 是 window。 就是 创建了一个局部变量 $ = window.jQuery. window.myExample 等于一个空方法。 外面那个是闭包自执行。
    Frannk
        3
    Frannk  
       Apr 3, 2013
    这样呢?
    (function (globle) {
    var $ = this.jQuery;

    globle.myExample = function () {};
    }(this));
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2518 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 05:01 · PVG 13:01 · LAX 22:01 · JFK 01:01
    ♥ Do have faith in what you're doing.