1.on的用法
on(this.btnDiscover, 'click', lang.hitch(this, '_onBtnDiscoverClick'));
2.lang的用法
// define an object
var
foo = {
bar: { }
};
// search the global scope
lang.exists(
"foo.bar"
);
// true
lang.exists(
"foo.bar.baz"
);
// false
// search from a particular scope
lang.exists(
"bar"
,
foo);
// true
lang.exists(
"bar.baz"
,
foo);
// false
on(this.btnDiscover, 'click',
lang.hitch(this, '_onBtnDiscoverClick'));
3.對於index.html通常js都有一個construct function 用來初始化變量,並且將頁面的變量綁定一些方法。