1、RequireJS进阶 ”异步加载”(asynchronous)模块 试用浏览器
AMD(异步模块定义)AMD是”Asynchronous Module Definition”的缩写,AMD就只有一个接口:define(id?,dependencies?,factory);
(带 id
和 deps
参数的 define
用法不属于 CMD 规范,而属于 Modules/Transport 规范)
3、Sea.js 中,所有 JavaScript 模块都遵循 CMD(Common Module Definition) 模块定义规范,一个模块一个文件。使用define(factory);定义模块、使用use
”同步加载”(synchronous) 试用服务器端
define(function(require, exports, module) {// 模块代码});表示seaJs模块定义define(factory)的构造方法。
Node中require引入模块,使用module.exports。
2、CommonJS定义的模块分为:{模块引用(require)} {模块定义(exports)} {模块标识(module)} 服务器端的
2、chrome浏览器的跨域设置
2、i18n.js 页面国际化
4、“use strict” 严格模式