Document

DOJO常用的:

1,通过dojo.require以类似C编程中#include或者Java中import的方式加载所需的部件
如dojo.require("dojo.parser");dojo.require("dijit.form.Button");
2,跨域自定义模块
Dojo配置,djConfig="baseUrl:'./'"
注册模块的路径,dojo.registerModulePath("dtdg","./dtdg");
加载自定义模块,dojo.require("dtdg.foo");
3,本地工具箱模块
直接加载自定义模块,dojo.require("dtdg.foo");
4,为对象注册事件
dojo.connect();
5,json和字符串之间转换
dojo.fromJson(/*String*/ json);//返回JavaScript对象,json对象
dojo.toJson(/*Object*/ json, /*Boolean*/ prettyPrint);//返回字符串
6,Ajax通信
dojo.xhrGet(/*Object*/ args);dojo.xhrPost(/*Object*/ args);
dojo.xhr(/*String*/ method, /*Object*/ args, /*Boolean?*/ hasBody);
7,本地化
djConfig="dojo.local:'zh'"
8,控件、布局等都在dijit中

原文地址:https://www.cnblogs.com/chenyanlong/p/7155628.html