| Package: | Global |
| Class: | Ext |
| Extends: | Object |
| Defined In: | Ext.js |
| 属性 | 定义对象 | |
|---|---|---|
| BLANK_IMAGE_URL : String | Ext | |
| 指定一个 1x1 大小的 gif 透明图片的地址,让 CSS 用来做为创建的内联图标的背景。 | ||
| SSL_SECURE_URL : String | Ext | |
| 指定一个指向空白文件的地址,让 Ext 在安全模式下用来填充“iframe”和“onReady”的 src 属性,以避免 IE 的不安全内容警告。 | ||
| isReady : Boolean | Ext | |
| 当值为“true”时表示“document”对象已经完全初始化。 | ||
| isSecure : Boolean | Ext | |
| 当值为“true”时表示当前网页通过 SSL 安全协议访问。 | ||
| isStrict : Boolean | Ext | |
| 当值为“true”时表示浏览器处于“strict”模式。 | ||
| useShims : Boolean | Ext | |
| Ext 自动决定浮动元素是否应该被填充。 | ||
| 方法 | 定义对象 | |
|---|---|---|
addBehaviors(Object obj) : void |
Ext | |
| 当文档准备好后,将事件监听器添加在由选择器选定的元素上。 | ||
apply(Object obj, Object config, Object defaults) : Object |
Ext | |
| *将“config”对象的所有属性复制到“obj”对象上。 | ||
applyIf(Object obj, Object config) : Object |
Ext | |
| 将“config”对象所有属性中“obj”对象所有没有的属性复制到“obj”对象上。 | ||
| decode() : void | Ext | |
| Ext.util.JSON.decode方法的缩写。 | ||
each(Array/NodeList/Mixed array, Function fn, Object scope) : void |
Ext | |
| 循环迭代数组中的每一个对象,执行指定的函数,当函数返回“false”时停止。 | ||
| encode() : void | Ext | |
| Ext.util.JSON.encode方法的缩写。 | ||
escapeRe(String str) : String |
Ext | |
| 将指定的字符转为正则表达式。 | ||
extend(Object subclass, Object superclass, [Object overrides]) : void |
Ext | |
| “subclass”类继承“superclass”类,并可根据指定的“overrides”覆盖父类成员。 | ||
fly(String/HTMLElement el, [String named]) : Element |
Ext | |
| <static> 返回全局共享的享元元素,并将指定的节点做为活动元素。 | ||
get(String/HTMLElement/Element el) : Element |
Ext | |
| 检索元素对象的静态方法。 | ||
getCmp(String id) : Ext.Component |
Ext | |
| Ext.ComponentMgr.get方法的缩写。 | ||
getDom(String/HTMLElement/Element) el) : HTMLElement |
Ext | |
| 返回指定的 Dom 元素。 | ||
id([String/HTMLElement/Element el], [String prefix]) : void |
Ext | |
| 生成一个唯一的ID。 | ||
namespace(String namespace1, String namespace2, String etc) : void |
Ext | |
| 创建命名空间并不假定“YAHOO”为根。 | ||
onReady(Function fn, Object scope, boolean override) : void |
Ext | |
| 当“document”对象准备好后执行指定函数(在“onload”事件与图片加载之前)。 | ||
query(String path, [Node root]) : Array |
Ext | |
| 选择一个由 CSS/XPath 选择器选定的 DOM 节点数组。 | ||
select(String/Array selector, [Boolean unique]) : CompositeElementLite/CompositeElement |
Ext | |
| 选择一个由 CSS 选择器选定的元素。 | ||
urlDecode(String string, [Boolean overwrite]) : Object |
Ext | |
| 将指定的 URL 地址解码并将其转换为一个对象。 | ||
urlEncode(Object o) : String |
Ext | |
| 将指定的对象转换为经过编码的 URL。 | ||
public String BLANK_IMAGE_URL
public String SSL_SECURE_URL
public Boolean isReady
public Boolean isSecure
public Boolean isStrict
public Boolean useShims
public function addBehaviors(Object obj)
Ext.addBehaviors({
// 给所有 ID 为“foo”的元素添加一个单击事件监听器
'#foo a@click' : function(e, t){
// 实际代码
},
// 给多个元素添加一样的事件监听器(元素由“@”符号之前的“,”分割)
'#foo a, #bar span.some-class@mouseover' : function(){
// 实际代码
}
});
obj : Object
voidpublic function apply(Object obj, Object config, Object defaults)
obj : Object
config : Object
defaults : Object
Object
public function applyIf(Object obj, Object config)
obj : Object
config : Object
Object
public function each(Array/NodeList/Mixed array, Function fn, Object scope)
array : Array/NodeList/Mixed
fn : Function
scope : Object
voidpublic function escapeRe(String str)
str : String
Stringpublic function extend(Object subclass, Object superclass, [Object overrides])
subclass : Object
superclass : Object
overrides : Object
voidpublic function fly(String/HTMLElement el, [String named])
el : String/HTMLElement
named : String
Element
public function get(String/HTMLElement/Element el)
el : String/HTMLElement/Element
Element
public function getCmp(String id)
id : String
Ext.Componentpublic function getDom(String/HTMLElement/Element) el)
el : String/HTMLElement/Element)
HTMLElementpublic function id([String/HTMLElement/Element el], [String prefix])
el : String/HTMLElement/Element
prefix : String
voidpublic function namespace(String namespace1, String namespace2, String etc)
namespace1 : String
namespace2 : String
etc : String
voidpublic function onReady(Function fn, Object scope, boolean override)
fn : Function
scope : Object
override : boolean
voidpublic function query(String path, [Node root])
path : String
root : Node
Arraypublic function select(String/Array selector, [Boolean unique])
selector : String/Array
unique : Boolean
CompositeElementLite/CompositeElementpublic function urlDecode(String string, [Boolean overwrite])
string : String
overwrite : Boolean
Object
public function urlEncode(Object o)
o : Object
String