| |
setVisibilityMode
(
*/
)
: Ext.Element
设置元素的可见模式。
当调用setVisible()时,会确定可见模...
设置元素的可见模式。
当调用setVisible()时,会确定可见模式究竟是“可见性visibility”的还是“显示display”的。
|
Element
|
| |
enableDisplayMode
(
[String display]
)
: Ext.Element
调用setVisibilityMode(Element.DISPLAY...
调用setVisibilityMode(Element.DISPLAY)的快捷方式
参数项:
display : String
(可选的)当可见时显示的内容
返回:
|
Element
|
| |
findParent
(
String selector,
Number/Mixed maxDepth,
Boolean returnEl,
String simpleSelector,
[Boolean returnEl]
)
: HTMLElement
Looks at this node and then at pare...
Looks at this node and then at parent nodes for
a match of the passed simple selector (e.g. div.some-class or span:first-child)
search as a number or element (defaults to 10 || document.body)
/
定位此节点并按照传入的简易选择符(如 div.some-class or span:first-child)查找父节点。
参数项:
selector : String
The simple selector to test
maxDepth : Number/Mixed
(optional) The max depth to
search as a number or element (defaults to 10 || document.body)
returnEl : Boolean
(optional) True to return a Ext.Element object instead of DOM node
/
/
定位此节点并按照传入的简易选择符(如 div.some-class or span:first-child)查找父节点。
simpleSelector : String
要测试的简易选择符
@param {Number/String/HTMLElement/Element} maxDepth (可选的) 搜索深度(MaxDepth),可以为number或元素(默认是 10 || document.body)
returnEl : Boolean
(可选的) True表示为返回Ext.Element对象,false的话返回DOM节点
返回:
HTMLElement The matching DOM node (or null if no match was found)
|
Element
|
| |
findParentNode
(
String simpleSelector,
[Boolean returnEl]
)
: HTMLElement
按照简易选择符查找父节点。选择符如 div.some-class or...
按照简易选择符查找父节点。选择符如 div.some-class or span:first-child。
参数项:
返回:
HTMLElement 匹配的DOM节点(null的话表示没有匹配结果)
|
Element
|
| |
up
(
String selector,
Number/Mixed maxDepth,
String simpleSelector,
[Boolean returnEl]
)
: Ext.Element
Walks up the dom looking for a pare...
Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child).
This is a shortcut for findParentNode() that always returns an Ext.Element.
search as a number or element (defaults to 10 || document.body)
传入一个选择符的参数,按照选择符并沿着dom查找父节点。选择符应是简易的选择符,如 div.some-class or span:first-child。
参数项:
selector : String
The simple selector to test
maxDepth : Number/Mixed
(optional) The max depth to
search as a number or element (defaults to 10 || document.body)
传入一个选择符的参数,按照选择符并沿着dom查找父节点。选择符应是简易的选择符,如 div.some-class or span:first-child。
simpleSelector : String
要测试的简易选择符
@param {Number/String/HTMLElement/Element} maxDepth (可选的) 搜索深度(MaxDepth),可以为number或元素(默认是 10 || document.body)
returnEl : Boolean
(可选的) True:返回Ext.Element对象代替DOM节点
返回:
Ext.Element The matching DOM node (or null if no match was found) this
|
Element
|
| |
is
(
String selector,
String ss
)
: Boolean
Returns true if this element matche...
Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)
返回true,如果这个元素就是传入的简易选择符参数(如 div.some-class或span:first-child)
参数项:
返回:
Boolean True if this element matches the selector, else false
|
Element
|
| |
animate
(
Object args,
Float duration,
Function onComplete,
String easing,
String animType,
Object args,
[Float duration],
[Function onComplete],
[String easing],
[String animType]
)
: Ext.Element
Perform animation on this element.
...
Perform animation on this element.
在元素上执行动画
参数项:
args : Object
The animation control args
duration : Float
(optional) How long the animation lasts in seconds (defaults to .35)
onComplete : Function
(optional) Function to call when animation completes
easing : String
(optional) Easing method to use (defaults to 'easeOut')
animType : String
(optional) 'run' is the default. Can also be 'color', 'motion', or 'scroll'
在元素上执行动画
args : Object
YUI之动画配置参数
duration : Float
(可选的) 动画持续多久 (默认为 .35 秒)
onComplete : Function
(可选的) 动画完成后调用的函数
easing : String
(可选的) 采用的“松开”方法 (默认为 'easeOut')
animType : String
(可选的) 默认为'run'。 可以是'color', 'motion', 或 'scroll'
返回:
|
Element
|
| |
clean
(
Boolean forceReclean,
[Boolean forceReclean]
)
Removes worthless text nodes
keeps...
Removes worthless text nodes
keeps track if it has been cleaned already so
you can call this over and over. However, if you update the element and
need to force a reclean, you can pass true.
移除无用的文本节点
元素会追踪自己是否已被清除了,所以你可以不断地调用这个方法
然而,如果你需要更新元素而且需要强制清除,你可以传入true的参数。
参数项:
forceReclean : Boolean
(optional) By default the element
keeps track if it has been cleaned already so
you can call this over and over. However, if you update the element and
need to force a reclean, you can pass true.
移除无用的文本节点
forceReclean : Boolean
(可选的)缺省地,
元素会追踪自己是否已被清除了,所以你可以不断地调用这个方法
然而,如果你需要更新元素而且需要强制清除,你可以传入true的参数。
返回:
|
Element
|
| |
scrollIntoView
(
Mixed container,
Boolean hscroll,
[Boolean hscroll]
)
: Ext.Element
Scrolls this element into view with...
Scrolls this element into view within the passed container.
传入一个容器(container)参数,把元素滚动到容器的视图(View)。
参数项:
container : Mixed
(optional) The container element to scroll (defaults to document.body)
hscroll : Boolean
(optional) False to disable horizontal scroll (defaults to true)
传入一个容器(container)参数,把元素滚动到容器的视图(View)。
@param {String/HTMLElement/Element} container (可选的)滚动容器的元素(默认为document.body)
hscroll : Boolean
(可选的)false表示为禁止水平滚动
返回:
|
Element
|
| |
autoHeight
(
Boolean animate,
Float duration,
Function onComplete,
String easing,
[Boolean animate],
[Float duration],
[Function onComplete],
[String easing]
)
: Ext.Element
Measures the element's content heig...
Measures the element's content height and updates height to match. Note: this function uses setTimeout so
the new height may not be available immediately.
测量元素其内容的实际高度,使元素之高度适合。
注:改函数使用setTimeout所以新高度或者不会立即有效。
参数项:
animate : Boolean
(optional) Animate the transition (defaults to false)
duration : Float
(optional) Length of the animation in seconds (defaults to .35)
onComplete : Function
(optional) Function to call when animation completes
easing : String
(optional) Easing method to use (defaults to easeOut)
测量元素其内容的实际高度,使元素之高度适合。
注:改函数使用setTimeout所以新高度或者不会立即有效。
animate : Boolean
(可选的)变换(默认 false)
duration : Float
(可选的)动画持续时间(默认为0.35秒)
onComplete : Function
(可选的)动画完成后执行的函数
easing : String
(可选的)采用清除的方法(默认为easeOut)
返回:
|
Element
|
| |
contains
(
HTMLElement/String el,
HTMLElement/String el
)
: Boolean
Returns true if this element is an ...
Returns true if this element is an ancestor of the passed element
返回true,如果这个元素是传入元素的父级元素(ancestor)
参数项:
el : HTMLElement/String
The element to check
返回true,如果这个元素是传入元素的父级元素(ancestor)
el : HTMLElement/String
要检查的元素
@return {Boolean} true表示这个元素是传入元素的父级元素,否则返回false
返回:
Boolean True if this element is an ancestor of el, else false
|
Element
|
| |
isVisible
(
Boolean deep,
[Boolean deep]
)
: Boolean
Checks whether the element is curre...
Checks whether the element is currently visible using both visibility and display properties.
检查当前该元素是否都使用属性visibility和属性display来显示。
参数项:
deep : Boolean
(optional) True to walk the dom and see if parent elements are hidden (defaults to false)
检查当前该元素是否都使用属性visibility和属性display来显示。
deep : Boolean
(可选的)True表示为沿着DOM一路看父元素是否隐藏的。
@return {Boolean} true表示该元素当前是可见的,否则返回false
返回:
Boolean True if the element is currently visible, else false
|
Element
|
| |
select
(
String selector,
Boolean unique,
String selector,
Boolean unique
)
:
Creates a {@link Ext.CompositeEleme...
Creates a {@link Ext.CompositeElement} for child nodes based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符为子节点创建一个{@link Ext.CompositeElement}组合元素。(选择符不应有id)
参数项:
selector : String
The CSS selector
unique : Boolean
(optional) True to create a unique Ext.Element for each child (defaults to false, which creates a single shared flyweight object)
传入一个CSS选择符的参数,然后基于该选择符为子节点创建一个Ext.CompositeElement组合元素。(选择符不应有id)
selector : String
CSS选择符
unique : Boolean
true表示为为每个子元素创建唯一的Ext.Element(默认为false享元的普通对象flyweight object)
返回:
|
Element
|
| |
query
(
String selector,
String selector
)
: Array
Selects child nodes based on the pa...
Selects child nodes based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符选取其子节点(选择符不应有id)
参数项:
返回:
Array An array of the matched nodes
|
Element
|
| |
child
(
String selector,
Boolean returnDom,
String selector,
[Boolean returnDom]
)
:
Selects a single child at any depth...
Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符,不限定深度,选取单个子节点(选择符不应有id)
|
Element
|
| |
down
(
String selector,
Boolean returnDom,
String selector,
[Boolean returnDom]
)
:
child based on the passed CSS selec...
child based on the passed CSS selector (the selector should not contain an id).
传入一个CSS选择符的参数,然后基于该选择符,"直接"选取单个子节点(选择符不应有id)
|
Element
|
| |
initDD
(
String group,
Object config,
Object overrides,
String DD,
Object config,
Object overrides
)
:
Initializes a {@link Ext.dd.DD} dra...
Initializes a {@link Ext.dd.DD} drag drop object for this element.
为这个元素初始化{@link Ext.dd.DD}对象
参数项:
group : String
The group the DD object is member of
config : Object
The DD config object
overrides : Object
An object containing methods to override/implement on the DD object
为这个元素初始化Ext.dd.DD对象
DD : String
对象隶属于的那个组(Group)
config : Object
DD之配置对象
overrides : Object
包含一些方法的对象,用于重写或实现(override/implement)DDTarget对象
返回:
|
Element
|
| |
initDDProxy
(
String group,
Object config,
Object overrides,
String group,
Object config,
Object overrides
)
:
Initializes a {@link Ext.dd.DDProxy...
Initializes a {@link Ext.dd.DDProxy} object for this element.
为这个元素初始化{@link Ext.dd.DDProxy}对象
参数项:
group : String
The group the DDProxy object is member of
config : Object
The DDProxy config object
overrides : Object
An object containing methods to override/implement on the DDProxy object
为这个元素初始化Ext.dd.DDProxy对象
group : String
DDProxy对象隶属于的那个组(Group)
config : Object
DDProxy之配置对象
overrides : Object
包含一些方法的对象,用于重写或实现(override/implement)DDTarget对象
返回:
|
Element
|
| |
initDDTarget
(
String group,
Object config,
Object overrides,
String group,
Object config,
Object overrides
)
:
Initializes a {@link Ext.dd.DDTarge...
Initializes a {@link Ext.dd.DDTarget} object for this element.
为这个元素初始化{@link Ext.dd.DDTarget}对象
参数项:
group : String
The group the DDTarget object is member of
config : Object
The DDTarget config object
overrides : Object
An object containing methods to override/implement on the DDTarget object
为这个元素初始化Ext.dd.DDTarget对象
group : String
DDTarget对象隶属于的那个组(Group)
config : Object
DDTarget之配置对象
overrides : Object
包含一些方法的对象,用于重写或实现(override/implement)DDTarget对象
返回:
|
Element
|
| |
setVisible
(
Boolean visible,
Boolean/Object animate,
Boolean visible,
[Boolean/Object animate]
)
: Ext.Element
Sets the visibility of the element ...
Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
设置元素可见性(参阅细节)。
如果visibilityMode 被设置成 Element.DISPLAY,
那么它会使用display属性来隐藏元素,否则它会使用visibility。默认是使用 visibility属性。
参数项:
visible : Boolean
Whether the element is visible
animate : Boolean/Object
(optional) True for the default animation, or a standard Element animation config object
设置元素可见性(参阅细节)。
如果visibilityMode 被设置成 Element.DISPLAY,
那么它会使用display属性来隐藏元素,否则它会使用visibility。默认是使用 visibility属性。
visible : Boolean
元素是否可见的
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
isDisplayed
(
)
: Boolean
Returns true if display is not "non...
Returns true if display is not "none"
如果属性display不是"none"就返回true
|
Element
|
| |
toggle
(
Boolean/Object animate,
[Boolean/Object animate]
)
: Ext.Element
Toggles the element's visibility or...
Toggles the element's visibility or display, depending on visibility mode.
轮回元素visibility或display,取决于visibility mode。
参数项:
animate : Boolean/Object
(optional) True for the default animation, or a standard Element animation config object
轮回元素visibility或display,取决于visibility mode。
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
@return {Ext.Element} this
返回:
|
Element
|
| |
setDisplayed
(
Mixed value,
Boolean value
)
: Ext.Element
Sets the CSS display property. Uses...
Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true.
设置Css display属性。如果value为true,则使用originalDisplay。
参数项:
value : Mixed
Boolean value to display the element using its default display, or a string to set the display directly.
设置Css display属性。如果value为true,则使用originalDisplay。
value : Boolean
如果value为true,则使用originalDisplay。否则直接设置显示的字符串、
@return {Ext.Element} this
返回:
|
Element
|
| |
focus
(
)
: Ext.Element
Tries to focus the element. Any exc...
Tries to focus the element. Any exceptions are caught and ignored.
使这个元素得到焦点。忽略任何已捕获的异常。
|
Element
|
| |
blur
(
)
: Ext.Element
Tries to blur the element. Any exce...
Tries to blur the element. Any exceptions are caught and ignored.
使这个元素失去焦点。忽略任何已捕获的异常。
|
Element
|
| |
addClass
(
String/Array className,
String/Array className
)
: Ext.Element
Adds one or more CSS classes to the...
Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.
为元素添加CSS类(CSS Class)。重复的类会被忽略。
参数项:
className : String/Array
The CSS class to add, or an array of classes
为元素添加CSS类(CSS Class)。重复的类会被忽略。
className : String/Array
要加入的CSS类或者由类组成的数组
@return {Ext.Element} this
返回:
|
Element
|
| |
radioClass
(
String/Array className,
String className
)
: Ext.Element
Adds one or more CSS classes to thi...
Adds one or more CSS classes to this element and removes the same class(es) from all siblings.
添加一个或多个className到这个元素,并移除其兄弟(siblings)节点上所有的样式。
参数项:
className : String/Array
The CSS class to add, or an array of classes
添加一个或多个className到这个元素,并移除其兄弟(siblings)节点上所有的样式。
className : String
要加入的className,或者是由类组成的数组
@return {Ext.Element} this
返回:
|
Element
|
| |
removeClass
(
String/Array className,
String/Array className
)
: Ext.Element
Removes one or more CSS classes fro...
Removes one or more CSS classes from the element.
移除元素的CSS类
参数项:
className : String/Array
The CSS class to remove, or an array of classes
移除元素的CSS类
className : String/Array
要移除的CSS类或者由类组成的数组
@return {Ext.Element} this
返回:
|
Element
|
| |
toggleClass
(
String className,
String className
)
: Ext.Element
Toggles the specified CSS class on ...
Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).
轮换(Toggles)--添加或移除指定的CSS类(如果已经存在的话便删除,否则就是新增加)。
|
Element
|
| |
hasClass
(
String className,
String className
)
: Boolean
Checks if the specified CSS class e...
Checks if the specified CSS class exists on this element's DOM node.
检查某个CSS类是否存在这个元素的DOM节点上
参数项:
返回:
Boolean True if the class exists, else false
|
Element
|
| |
replaceClass
(
String oldClassName,
String newClassName,
String oldClassName,
String newClassName
)
: Ext.Element
Replaces a CSS class on the element...
Replaces a CSS class on the element with another. If the old name does not exist, the new name will simply be added.
在这个元素身上替换CSS类。如果旧的CSS名称不存在,新的就会加入。
|
Element
|
| |
getStyles
(
String arg1,
String arg2,
String args
)
: Object
给出一些CSS属性名,得到其值
如 el.getStyles('co...
给出一些CSS属性名,得到其值
如 el.getStyles('color', 'font-size', 'width')会返回
{'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}.
参数项:
arg1 : String
样式一
arg2 : String
样式二
args : String
等等..
返回:
|
Element
|
| |
getStyle
(
String property,
String property
)
: String
Normalizes currentStyle and compute...
Normalizes currentStyle and computedStyle.
常规化当前样式和计算样式。
参数项:
返回:
String The current value of the style property for this element.
|
Element
|
| |
setStyle
(
String/Object property,
String value,
[String value]
)
: Ext.Element
Wrapper for setting style propertie...
Wrapper for setting style properties,
also takes single object parameter of multiple styles.
以打包的方式设置样式属性,也可以用一个对象参数包含多个样式。
参数项:
property : String/Object
The style property to be set, or an object of multiple styles.
value : String
(optional) The value to apply to the given property, or null if an object was passed.
以打包的方式设置样式属性,也可以用一个对象参数包含多个样式。
@param {String/Object} 要设置的样式属性,或是包含多个样式的对象
value : String
(可选的)样式属性的值,如果第一个参数是对象,则这个参数为null
返回:
|
Element
|
| |
applyStyles
(
*/ ,
)
: Ext.Element
More flexible version of {@link #se...
More flexible version of {@link #setStyle} for setting style properties.
a function which returns such a specification.
{@link #setStyle}的另一个版本,能更灵活地设置样式属性
参数项:
: */
@param {String/Object/Function} styles A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or
a function which returns such a specification.
#setStyle的另一个版本,能更灵活地设置样式属性
@param {String/Object/Function} styles 表示样式的特定格式字符串,如“width:100px”,或是对象的形式如{width:"100px"},或是能返回这些格式的函数
@return {Ext.Element} this
返回:
|
Element
|
| |
getX
(
)
: Number
Gets the current X position of the ...
Gets the current X position of the element based on page coordinates.
Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
获取元素基于页面坐标的X位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回false)。
参数项:
返回:
Number The X position of the element
|
Element
|
| |
getY
(
)
: Number
Gets the current Y position of the ...
Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
获取元素基于页面坐标的Y位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回false)。
参数项:
返回:
Number The Y position of the element
|
Element
|
| |
getXY
(
)
: Array
Gets the current position of the el...
Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
获取元素基于页面坐标当前的位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回false)。
参数项:
返回:
Array The XY position of the element
|
Element
|
| |
getOffsetsTo
(
Mixed element
)
: Array
Returns the offsets of this element...
Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates.
参数项:
返回:
Array The XY page offsets (e.g. [100, -200])
|
Element
|
| |
setX
(
Number The,
Boolean/Object animate,
Number x,
[Boolean/Object animate]
)
: Ext.Element
Sets the X position of the element ...
Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素基于页面坐标的X位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
The : Number
X position of the element
animate : Boolean/Object
(optional) True for the default animation, or a standard Element animation config object
设置元素基于页面坐标的X位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
x : Number
元素的X位置
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
setY
(
Number The,
Boolean/Object animate,
Number x,
[Boolean/Object animate]
)
: Ext.Element
Sets the Y position of the element ...
Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素基于页面坐标的Y位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
The : Number
Y position of the element
animate : Boolean/Object
(optional) True for the default animation, or a standard Element animation config object
设置元素基于页面坐标的Y位置。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
x : Number
元素的Y位置
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
setLeft
(
String left,
String left
)
: Ext.Element
Sets the element's left position di...
Sets the element's left position directly using CSS style (instead of {@link #setX}).
直接使用CSS样式(代替{@link #setX}),设定元素的left位置。
|
Element
|
| |
setTop
(
String top,
String top
)
: Ext.Element
Sets the element's top position dir...
Sets the element's top position directly using CSS style (instead of {@link #setY}).
直接使用CSS样式(代替{@link #setY}),设定元素的top位置。
|
Element
|
| |
setRight
(
String right,
String bottom
)
: Ext.Element
Sets the element's CSS right style....
Sets the element's CSS right style.
设置元素CSS Right的样式
|
Element
|
| |
setBottom
(
String bottom,
String bottom
)
: Ext.Element
Sets the element's CSS bottom style...
Sets the element's CSS bottom style.
设置元素CSS Bottom的样式
|
Element
|
| |
setXY
(
Array pos,
Boolean/Object animate,
Array pos,
[Boolean/Object animate]
)
: Ext.Element
Sets the position of the element in...
Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
pos : Array
Contains X & Y [x, y] values for new position (coordinates are page-based)
animate : Boolean/Object
(optional) True for the default animation, or a standard Element animation config object
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
pos : Array
对于新位置(基于页面坐标)包含X & Y [x, y]的值
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
setLocation
(
Number x,
Number y,
Boolean/Object animate,
Number x,
Number y,
[Boolean/Object animate]
)
: Ext.Element
Sets the position of the element in...
Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
x : Number
X value for new position (coordinates are page-based)
y : Number
Y value for new position (coordinates are page-based)
animate : Boolean/Object
(optional) True for the default animation, or a standard Element animation config object
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
x : Number
新定位的X值(基于页面坐标)
y : Number
新定位的Y值(基于页面坐标)
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
moveTo
(
Number x,
Number y,
Boolean/Object animate,
Number x,
Number y,
[Boolean/Object animate]
)
: Ext.Element
Sets the position of the element in...
Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
x : Number
X value for new position (coordinates are page-based)
y : Number
Y value for new position (coordinates are page-based)
animate : Boolean/Object
(optional) True for the default animation, or a standard Element animation config object
设置元素在页面的坐标位置,不管这个元素如何定位。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
x : Number
新定位的X值(基于页面坐标)
y : Number
新定位的Y值(基于页面坐标)
animate : Boolean/Object
(可选的) true :为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
getRegion
(
)
: Region
Returns the region of the given ele...
Returns the region of the given element.
The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
返回给出元素的区域。
元素必须是DOM树中的一部分,才拥有页面坐标(display:none或未加入的elements返回 false)。
参数项:
返回:
Region A Ext.lib.Region containing "top, left, bottom, right" member data.
|
Element
|
| |
getHeight
(
Boolean contentHeight,
[Boolean contentHeight]
)
: Number
Returns the offset height of the el...
Returns the offset height of the element
返回元素的偏移(offset)高度
参数项:
返回:
Number The element's height
|
Element
|
| |
getWidth
(
Boolean contentWidth,
[Boolean contentWidth]
)
: Number
Returns the offset width of the ele...
Returns the offset width of the element
返回元素的偏移(offset)宽度
参数项:
返回:
Number The element's width
|
Element
|
| |
getComputedHeight
(
)
: Number
当偏移值不可用时就模拟一个出来。该方法返回由padding或borde...
当偏移值不可用时就模拟一个出来。该方法返回由padding或borders调整过的元素CSS高度,也可能是偏移的高度。
如果不用CSS设置高度而且是display:none的元素,有可能不能正常工作。
|
Element
|
| |
getComputedWidth
(
)
: Number
当偏移值不可用时就模拟一个出来。该方法返回由padding或borde...
当偏移值不可用时就模拟一个出来。该方法返回由padding或borders调整过的元素CSS宽度,也可能是偏移的宽度。
如果不用CSS设置宽度而且是display:none的元素,有可能不能正常工作。
|
Element
|
| |
getSize
(
Boolean contentSize,
[Boolean contentSize]
)
: Object
Returns the size of the element.
...
Returns the size of the element.
返回元素尺寸大小。
参数项:
contentSize : Boolean
(optional) true to get the width/size minus borders and padding
返回元素尺寸大小。
contentSize : Boolean
(可选的) true表示为返回减去border和padding的宽度大小
@return {Object} 包含元素大小尺寸的对象,如{width: (element width), height: (element height)}
返回:
Object An object containing the element's size {width: (element width), height: (element height)}
|
Element
|
| |
getViewSize
(
)
: Object
Returns the width and height of the...
Returns the width and height of the viewport.
返回视图的高度和宽度。
参数项:
返回:
Object An object containing the viewport's size {width: (viewport width), height: (viewport height)}
|
Element
|
| |
getValue
(
Boolean asNumber,
Boolean asNumber
)
:
Returns the value of the "value" at...
Returns the value of the "value" attribute
返回“值的”属性值
|
Element
|
| |
setWidth
(
Number width,
Boolean/Object animate,
Number width,
[Boolean/Object animate]
)
: Ext.Element
Set the width of the element
设置元素的宽度
Set the width of the element
设置元素的宽度
|
Element
|
| |
setHeight
(
Number height,
Boolean/Object animate,
Number height,
[Boolean/Object animate]
)
: Ext.Element
Set the height of the element
设置元素的高度
Set the height of the element
设置元素的高度
|
Element
|
| |
setSize
(
Number width,
Number height,
Boolean/Object animate,
Number width,
Number height,
[Boolean/Object animate]
)
: Ext.Element
Set the size of the element. If ani...
Set the size of the element. If animation is true, both width an height will be animated concurrently.
设置元素的大小尺寸。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
|
Element
|
| |
setBounds
(
Number x,
Number y,
Number width,
Number height,
Boolean/Object animate,
Number x,
Number y,
Number width,
Number height,
[Boolean/Object animate]
)
: Ext.Element
Sets the element's position and siz...
Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.
一次过设置元素的位置和大小。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
参数项:
x : Number
X value for new position (coordinates are page-based)
y : Number
Y value for new position (coordinates are page-based)
width : Number
The new width
height : Number
The new height
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
一次过设置元素的位置和大小。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
x : Number
新位置上的x值(基于页面的坐标)
y : Number
新位置上的y值(基于页面的坐标)
width : Number
新宽度
height : Number
新高度
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
setRegion
(
*/ ,
Boolean/Object animate,
[Boolean/Object animate]
)
: Ext.Element
Sets the element's position and siz...
Sets the element's position and size the the specified region. If animation is true then width, height, x and y will be animated concurrently.
设置元素的位置并调整大小到指定的位置。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
参数项:
: */
@param {Ext.lib.Region} region The region to fill
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
设置元素的位置并调整大小到指定的位置。如果动画效果被打开,高度和宽度都会产生动画的变化效果。
@param {Ext.lib.Region} region 要填充的区域
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
addListener
(
String/HTMLElement eventName,
Function handler,
[Object scope]
)
为该组件加入事件句柄(event handler)。跟简写方式{@li...
为该组件加入事件句柄(event handler)。跟简写方式{@link #on}是一样的。
通常你会更多的使用元素本身{@link Ext.Element#removeListener}的方法。
|
Element
|
| |
removeListener
(
String eventName,
Function fn
)
: Ext.Element
从这个元素上移除事件句柄(event handler),跟简写方式{@...
从这个元素上移除事件句柄(event handler),跟简写方式{@link #un}是一样的。
举例:
el.removeListener('click', this.handlerFn);
//或
el.un('click', this.handlerFn);
参数项:
eventName : String
要移除事件的类型
fn : Function
事件执行的方法
返回:
|
Element
|
| |
removeAllListeners
(
)
: Ext.Element
Removes all previous added listener...
Removes all previous added listeners from this element
在该元素身上移除所有已加入的侦听器
|
Element
|
| |
relayEvent
(
String eventName,
Object object
)
Create an event handler on this ele...
Create an event handler on this element
创建此元素的事件句柄,由此元素接替另外的对象触发和处理事件。
such that when the event fires and is handled by this element,
it will be relayed to another object
(i.e., fired again as if it originated from that object instead).
|
Element
|
| |
setOpacity
(
Float opacity,
Boolean/Object animate,
Float opacity,
[Boolean/Object animate]
)
: Ext.Element
Set the opacity of the element
设...
Set the opacity of the element
设置元素透明度
参数项:
opacity : Float
The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
设置元素透明度
opacity : Float
新的透明度。 0 = 透明, .5 = 50% 可见, 1 =完全可见, 等等
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
getLeft
(
Boolean local,
Boolean local
)
: Number
Gets the left X coordinate
获取X坐标
Gets the left X coordinate
获取X坐标
|
Element
|
| |
getRight
(
Boolean local,
Boolean local
)
: Number
Gets the right X coordinate of the ...
Gets the right X coordinate of the element (element X position + element width)
获取元素的右X坐标 (元素X位置 + 元素宽度)
|
Element
|
| |
getTop
(
Boolean local,
Boolean local
)
: Number
Gets the top Y coordinate
获取顶部Y坐标
Gets the top Y coordinate
获取顶部Y坐标
|
Element
|
| |
getBottom
(
Boolean local,
Boolean local
)
: Number
Gets the bottom Y coordinate of the...
Gets the bottom Y coordinate of the element (element Y position + element height)
获取元素的底部Y坐标 (元素Y位置 + 元素宽度)
|
Element
|
| |
position
(
String pos,
Number zIndex,
Number x,
Number y,
[String pos],
[Number zIndex],
[Number x],
[Number y]
)
Initializes positioning on this ele...
Initializes positioning on this element. If a desired position is not passed, it will make the
the element positioned relative IF it is not already positioned.
初始化元素的定位。
如果不传入一个特定的定位,而又还没定位的话,将会使这个元素 相对(relative)定位
参数项:
pos : String
(optional) Positioning to use "relative", "absolute" or "fixed"
zIndex : Number
(optional) The zIndex to apply
x : Number
(optional) Set the page X position
y : Number
(optional) Set the page Y position
初始化元素的定位。
如果不传入一个特定的定位,而又还没定位的话,将会使这个元素 相对(relative)定位
pos : String
(可选的) 使用 "relative", "absolute" 或 "fixed"的定位
zIndex : Number
(可选的) z-Index值
x : Number
(可选的)设置页面 X方向位置
y : Number
(可选的) 设置页面 Y方向位置
返回:
|
Element
|
| |
clearPositioning
(
String value,
[String value]
)
: Ext.Element
Clear positioning back to the defau...
Clear positioning back to the default when the document was loaded
当文档加载后清除位置并复位到默认
参数项:
value : String
(optional) The value to use for the left,right,top,bottom, defaults to '' (empty string). You could use 'auto'.
当文档加载后清除位置并复位到默认
value : String
(可选的) 用于 left,right,top,bottom的值, 默认为 '' (空白字符串). 你可使用 'auto'.
@return {Ext.Element} this
返回:
|
Element
|
| |
getPositioning
(
)
: Object
Gets an object with all CSS positio...
Gets an object with all CSS positioning properties. Useful along with setPostioning to get
snapshot before performing an update and then restoring the element.
获取一个包含CSS定位的对象
有用的技巧:连同setPostioning一起,可在更新执行之前,先做一个快照(snapshot),之后便可恢复该元素。
|
Element
|
| |
getBorderWidth
(
String side,
String side
)
: Number
Gets the width of the border(s) for...
Gets the width of the border(s) for the specified side(s)
passing lr would get the border (l)eft width + the border (r)ight width.
获取指定边(side(s))的 border(s)宽度
例如,传入lr的参数会得到(l)eft padding +(r)ight padding
参数项:
side : String
Can be t, l, r, b or any combination of those to add multiple values. For example,
passing lr would get the border (l)eft width + the border (r)ight width.
获取指定边(side(s))的 border(s)宽度
side : String
可以是 t, l, r, b或是任何组合
例如,传入lr的参数会得到(l)eft padding +(r)ight padding
@return {Number} 四边的padding之和
返回:
Number The width of the sides passed added together
|
Element
|
| |
getPadding
(
String side,
String side
)
: Number
Gets the width of the padding(s) fo...
Gets the width of the padding(s) for the specified side(s)
passing lr would get the padding (l)eft + the padding (r)ight.
获取指定边(side(s))的padding宽度
例如,传入lr的参数会得到(l)eft padding +(r)ight padding
参数项:
side : String
Can be t, l, r, b or any combination of those to add multiple values. For example,
passing lr would get the padding (l)eft + the padding (r)ight.
获取指定边(side(s))的padding宽度
side : String
可以是 t, l, r, b或是任何组合
例如,传入lr的参数会得到(l)eft padding +(r)ight padding
@return {Number} 四边的padding之和
返回:
Number The padding of the sides passed added together
|
Element
|
| |
setPositioning
(
Object posCfg
)
: Ext.Element
Set positioning with an object retu...
Set positioning with an object returned by getPositioning().
由getPositioning()返回的对象去设置定位
|
Element
|
| |
setLeftTop
(
String left,
String top
)
: Ext.Element
Quick set left and top adding defau...
Quick set left and top adding default units
快速设置left和top(采用默认单位)
参数项:
left : String
CSS的left属性值
top : String
TCSS的top属性值
返回:
|
Element
|
| |
move
(
String direction,
Number distance,
Boolean/Object animate,
String direction,
Number distance,
[Boolean/Object animate]
)
: Ext.Element
Move this element relative to its c...
Move this element relative to its current position.
移动这个元素到相对于当前的位置。
参数项:
direction : String
Possible values are: "l","left" - "r","right" - "t","top","up" - "b","bottom","down".
distance : Number
How far to move the element in pixels
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
移动这个元素到相对于当前的位置。
direction : String
可能出现的值: "l","left" - "r","right" - "t","top","up" - "b","bottom","down".
distance : Number
元素移动有多远(像素)
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
clip
(
)
: Ext.Element
Store the current overflow setting ...
Store the current overflow setting and clip overflow on the element - use {@link #unclip} to remove
保存当前的溢出(overflow),然后进行裁剪元素的溢出部分 - 使用 {@link #unclip}来移除
|
Element
|
| |
unclip
(
)
: Ext.Element
Return clipping (overflow) to origi...
Return clipping (overflow) to original clipping before clip() was called
在调用clip()之前,返回原始的裁剪部分(溢出的)
|
Element
|
| |
getAnchorXY
(
String anchor,
Boolean local,
Object size,
[String anchor],
[Object size],
[Boolean local]
)
: Array
Gets the x,y coordinates specified ...
Gets the x,y coordinates specified by the anchor position on the element.
for details on supported anchor positions.
of page coordinates
{width: (target width), height: (target height)} (defaults to the element's current size)
返回X、Y坐标,由元素已标记好的位置(anchor position)指定。
{width: (目标宽度), height: (目标高度)} (默认为元素当前大小)
参数项:
anchor : String
(optional) The specified anchor position (defaults to "c"). See #alignTo
for details on supported anchor positions.
local : Boolean
(optional) True to get the local (element top/left-relative) anchor position instead
of page coordinates
size : Object
(optional) An object containing the size to use for calculating anchor position
{width: (target width), height: (target height)} (defaults to the element's current size)
返回X、Y坐标,由元素已标记好的位置(anchor position)指定。
anchor : String
(可选的) 指定的标记位置(默认为 "c")。参阅 #alignTo可支持的标记好的位置(anchor position)之细节。
size : Object
(可选的) 用于计算标记位置的对象
{width: (目标宽度), height: (目标高度)} (默认为元素当前大小)
local : Boolean
(可选的) true表示为获取局部的(元素相对的 top/left) 标记的位置而非页面坐标
返回:
Array [x, y] An array containing the element's x and y coordinates
|
Element
|
| |
getAlignToXY
(
Mixed element,
String position,
Array offsets,
String position,
[Array offsets]
)
: Array
Gets the x,y coordinates to align t...
Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the
supported position values.
获取该元素对齐另一个元素时候的x,y坐标。参阅 {@link #alignTo}了解可支持的位置值。
参数项:
element : Mixed
The element to align to.
position : String
The position to align to.
offsets : Array
(optional) Offset the positioning by [x, y]
获取该元素对齐另一个元素时候的x,y坐标。参阅 #alignTo了解可支持的位置值。
@param {String/HTMLElement/Ext.Element} element 要对齐的元素
position : String
要对齐的位置
offsets : Array
(可选的) 偏移位置 [x, y]
返回:
|
Element
|
| |
alignTo
(
Mixed element,
String position,
Array offsets,
Boolean/Object animate,
String position,
[Array offsets],
[Boolean/Object animate]
)
: Ext.Element
Aligns this element with another el...
Aligns this element with another element relative to the specified anchor points. If the other element is the
document it aligns it to the viewport.
The position parameter is optional, and can be specified in any one of the following formats:
- Blank: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").
- One anchor (deprecated): The passed anchor position is used as the target element's anchor point.
The element being aligned will position its top-left corner (tl) to that point. This method has been
deprecated in favor of the newer two anchor syntax below.
- Two anchors: If two values from the table below are passed separated by a dash, the first value is used as the
element's anchor point, and the second value is used as the target's anchor point.
对齐元素到另外一个元素的指定的标记。如果这个元素是document,对齐到视图
位置参数是可选的, 可指定为下列格式:
- 空白: 默认为 aligning the element"s top-left corner to
the target"s bottom-left corner ("tl-bl").
- 有一个锚点()One anchor (deprecated): The passed anchor position is used as the target element's anchor point.
The element being aligned will position its top-left corner (tl) to
that point. This method has been
deprecated in favor of the newer two anchor syntax below.
- 有两个锚点:
If two values from the table below are passed separated by a dash,
the first value is used as the
element"s anchor point, and the second value is used as the target"s anchor point.
In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of
the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to
the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than
that specified in order to enforce the viewport constraints.
Following are all of the supported anchor positions:
下列可支持的锚点位置:
Value Description
值 描述
----- -----------------------------
tl The top left corner (default)
t The center of the top edge
tr The top right corner
l The center of the left edge
c In the center of the element
r The center of the right edge
bl The bottom left corner
b The center of the bottom edge
br The bottom right corner
Example Usage:
使用范例:
// align el to other-el using the default positioning ("tl-bl", non-constrained)
el.alignTo("other-el");
// align the top left corner of el with the top right corner of other-el (constrained to viewport)
el.alignTo("other-el", "tr?");
// align the bottom right corner of el with the center left edge of other-el
el.alignTo("other-el", "br-l?");
// align the center of el with the bottom left corner of other-el and
// adjust the x position by -6 pixels (and the y position by 0)
el.alignTo("other-el", "c-bl", [-6, 0]);
参数项:
element : Mixed
The element to align to.
position : String
The position to align to.
offsets : Array
(optional) Offset the positioning by [x, y]
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
@param {String/HTMLElement/Ext.Element} element 要对齐的元素
position : String
要对齐的位置
offsets : Array
(可选的) 偏移位置 [x, y]
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
anchorTo
(
Mixed element,
String position,
Array offsets,
Boolean/Object animate,
Boolean/Number monitorScroll,
Function callback,
String position,
[Array offsets],
[Boolean/Object animate],
[Boolean/Number monitorScroll],
Function callback
)
: Ext.Element
Anchors an element to another eleme...
Anchors an element to another element and realigns it when the window is resized.
is a number, it is used as the buffer delay (defaults to 50ms).
标记一个元素到另外一个元素,并当window resiz时重新对齐。
参数项:
element : Mixed
The element to align to.
position : String
The position to align to.
offsets : Array
(optional) Offset the positioning by [x, y]
animate : Boolean/Object
(optional) True for the default animation or a standard Element animation config object
monitorScroll : Boolean/Number
(optional) True to monitor body scroll and reposition. If this parameter
is a number, it is used as the buffer delay (defaults to 50ms).
callback : Function
The function to call after the animation finishes
标记一个元素到另外一个元素,并当window resiz时重新对齐。
@param {String/HTMLElement/Ext.Element} element 要对齐的元素
position : String
要对齐的位置
offsets : Array
(可选的) 偏移位置 [x, y]
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
monitorScroll : Boolean/Number
(可选的) true表示为监视body滚动并重新定位。如果该参数是一个数字,即意味有缓冲延时(默认为 50ms)
callback : Function
动画完成后执行的函数
返回:
|
Element
|
| |
clearOpacity
(
)
: Ext.Element
Clears any opacity settings from th...
Clears any opacity settings from this element. Required in some cases for IE.
清除这个元素的透明度设置。IE有时候会用到
|
Element
|
| |
hide
(
Boolean/Object animate,
[Boolean/Object animate]
)
: Ext.Element
Hide this element - Uses display mo...
Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
隐藏此元素 -使用display mode 来决定用 "display" 抑或 "visibility"。 参阅 {@link #setVisible}.
参数项:
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
隐藏此元素 -使用display mode 来决定用 "display" 抑或 "visibility"。 参阅 #setVisible.
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
@return {Ext.Element} this
返回:
|
Element
|
| |
show
(
Boolean/Object animate,
[Boolean/Object animate]
)
: Ext.Element
Show this element - Uses display mo...
Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
显示此元素 -使用display mode 来决定用 "display" 抑或 "visibility"。 参阅 {@link #setVisible}.
参数项:
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
显示此元素 -使用display mode 来决定用 "display" 抑或 "visibility"。 参阅 #setVisible.
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
@return {Ext.Element} this
返回:
|
Element
|
| |
update
(
String html,
Boolean loadScripts,
Function callback,
String html,
[Boolean loadScripts],
Function callback
)
: Ext.Element
Update the innerHTML of this elemen...
Update the innerHTML of this element, optionally searching for and processing scripts
更新该元素的innerHTML,遇到脚本可以执行。
参数项:
html : String
The new HTML
loadScripts : Boolean
(optional) True to look for and process scripts (defaults to false)
callback : Function
(optional) For async script loading you can be notified when the update completes
更新该元素的innerHTML,遇到脚本可以执行。
html : String
新的HTML
loadScripts : Boolean
(可选的) true表示为遇到脚本要执行
callback : Function
当更新完成后,你加载一个同步脚本,得知更新完成。
返回:
|
Element
|
| |
load
(
String/Function url,
String/Object params,
Function callback,
Boolean discardUrl,
String/Function url,
[String/Object params],
[Function callback],
[Boolean discardUrl]
)
: Ext.Element
Direct access to the Updater {@link...
Direct access to the Updater {@link Ext.Updater#update} method (takes the same parameters).
直接访问Updater的{@link Ext.Updater#update}方法(相同的参数)
参数项:
url : String/Function
The url for this request or a function to call to get the url
params : String/Object
(optional) The parameters to pass as either a url encoded string "param1=1¶m2=2" or an object {param1: 1, param2: 2}
callback : Function
(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)
discardUrl : Boolean
(optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url.
直接访问Updater的Ext.Updater#update方法(相同的参数)
url : String/Function
针对该请求的url或是能返回url的函数
params : String/Object
(可选的)作为url一部分的参数,可以是已编码的字符串"param1=1¶m2=2",或是一个对象{param1: 1, param2: 2}
callback : Function
(可选的)请求往返完成后的回调,调用时有参数(oElement, bSuccess)
discardUrl : Boolean
(可选的)默认情况下你执行一次更新后,最后一次url会保存到defaultUrl。如果true的话,将不会保存。
返回:
|
Element
|
| |
getUpdater
(
)
: Ext.Updater
Gets this element's Updater
获取这个...
Gets this element's Updater
获取这个元素的UpdateManager
|
Element
|
| |
unselectable
(
)
: Ext.Element
Disables text selection for this el...
Disables text selection for this element (normalized across browsers)
禁止该元素的文本可被选择(可跨浏览器)。
|
Element
|
| |
getCenterXY
(
)
: Array
Calculates the x, y to center this ...
Calculates the x, y to center this element on the screen
计算该元素的x,y到屏幕中心的值
参数项:
返回:
Array The x, y values [x, y]
|
Element
|
| |
center
(
Mixed centerIn,
)
Centers the Element in either the v...
Centers the Element in either the viewport, or another Element.
在视图或其他元素中,居中元素。
|
Element
|
| |
isBorderBox
(
)
: Boolean
Tests various css rules/browsers to...
Tests various css rules/browsers to determine if this element uses a border box
测试不同的CSS规则/浏览器以确定该元素是否使用Border Box
|
Element
|
| |
getBox
(
Boolean contentBox,
Boolean local,
[Boolean contentBox],
[Boolean local]
)
: Object
Return a box {x, y, width, height} ...
Return a box {x, y, width, height} that can be used to set another elements
size/location to match this element.
返回一个BOX {x, y, width, height},可用于匹配其他元素的大小/位置。
参数项:
contentBox : Boolean
(optional) If true a box for the content of the element is returned.
local : Boolean
(optional) If true the element's left and top are returned instead of page x/y.
返回一个BOX {x, y, width, height},可用于匹配其他元素的大小/位置。
contentBox : Boolean
(可选的)true表示为返回元素内容的BOX。
local : Boolean
(可选的) true表示为返回元素的left和top代替页面的x/y。
返回:
Object box An object in the format {x, y, width, height}
|
Element
|
| |
getFrameWidth
(
String sides
)
: Number
Returns the sum width of the paddin...
Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
for more information about the sides.
传入的“side”的参数,统计边框和内补丁(padding & borders)的宽度并返回该值。
参阅getBorderWidth()以得到更多sides的资料
|
Element
|
| |
setBox
(
Object box,
Boolean adjust,
Boolean/Object animate,
Object box,
[Boolean adjust],
[Boolean/Object animate]
)
: Ext.Element
Sets the element's box. Use getBox(...
Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.
设置元素之Box。使用getBox() 在其他对象身上获取box对象。
如果动画为true,那么高度和宽度都会同时出现动画效果。
参数项:
box : Object
The box to fill {x, y, width, height}
adjust : Boolean
(optional) Whether to adjust for box-model issues automatically
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
设置元素之Box。使用getBox() 在其他对象身上获取box对象。
如果动画为true,那么高度和宽度都会同时出现动画效果。
box : Object
填充的Box {x, y, width, height}
adjust : Boolean
(可选的) 是否自动调整由box-mode问题引起的高度和宽度设置
animate : Boolean/Object
(可选的) true表示为为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
repaint
(
)
: Ext.Element
Forces the browser to repaint this ...
Forces the browser to repaint this element
强制浏览器重新渲染该元素
|
Element
|
| |
getMargins
(
String sides,
[String sides]
)
:
Returns an object with properties t...
Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,
then it returns the calculated width of the sides (see getPadding)
返回该元素的top、left、right 和 bottom 属性,以表示margin(外补丁)。
若有sides参数传入,即返回已计算好的sides宽度。
参数项:
sides : String
(optional) Any combination of l, r, t, b to get the sum of those sides
返回该元素的top、left、right 和 bottom 属性,以表示margin(外补丁)。
若有sides参数传入,即返回已计算好的sides宽度。
sides : String
(可选的) 任何 l, r, t, b的组合,以获取该 sides的统计。
@return {Object/Number}
返回:
|
Element
|
| |
createProxy
(
String/Object config,
String/HTMLElement renderTo,
Boolean matchBox,
String/Object config,
[String/HTMLElement renderTo],
[Boolean matchBox]
)
: Ext.Element
Creates a proxy element of this ele...
Creates a proxy element of this element
创建代理(Proxy),即元素的元素
参数项:
config : String/Object
The class name of the proxy element or a DomHelper config object
renderTo : String/HTMLElement
(optional) The element or element id to render the proxy to (defaults to document.body)
matchBox : Boolean
(optional) True to align and size the proxy to this element now (defaults to false)
创建代理(Proxy),即元素的元素
config : String/Object
代理元素的类名称或是DomHelper配置项对象
renderTo : String/HTMLElement
(可选的) 成为代理的元素或是元素ID (默认为 document.body)
matchBox : Boolean
(可选的) true表示为立即和代理对齐和设置大小 (默认为 false)
返回:
Ext.Element The new proxy element this
|
Element
|
| |
mask
(
String msg,
String msgCls,
[String msg],
[String msgCls]
)
: Element
Puts a mask over this element to di...
Puts a mask over this element to disable user interaction. Requires core.css.
This method can only be applied to elements which accept child nodes.
在元素身上遮上一个蒙板(mask),以禁止用户操作。须core.css。
这个方法只能用于接受子节点(child nodes)的元素。
|
Element
|
| |
unmask
(
)
Removes a previously applied mask.
...
Removes a previously applied mask.
移除之前的蒙板。
如果removeEl是true,则蒙板会被摧毁,否则放在缓存cache中。
|
Element
|
| |
isMasked
(
)
: Boolean
Returns true if this element is mas...
Returns true if this element is masked
返回true表示为这个元素应用了蒙板。
|
Element
|
| |
createShim
(
)
: Ext.Element
Creates an iframe shim for this ele...
Creates an iframe shim for this element to keep selects and other windowed objects from
showing through.
创建一个iframe垫片来使得select和其他windowed对象在该元素显示之下。
参数项:
返回:
Ext.Element The new shim element this
|
Element
|
| |
remove
(
)
Removes this element from the DOM a...
Removes this element from the DOM and deletes it from the cache
从DOM里面移除该元素,并从缓存中删除。
|
Element
|
| |
hover
(
Function overFn,
Function outFn,
Object scope,
Function overFn,
Function outFn,
[Object scope]
)
: Ext.Element
Sets up event handlers to call the ...
Sets up event handlers to call the passed functions when the mouse is over this element.
Automatically filters child element mouse events.
设置事件句柄,当鼠标在此元素之上作用的Css样式类。自动过滤因mouseout事件引起在子元素上的轻移(Flicker)
|
Element
|
| |
addClassOnOver
(
String className,
[Boolean preventFlicker]
)
: Ext.Element
Sets up event handlers to add and r...
Sets up event handlers to add and remove a css class when the mouse is over this element
设置事件句柄,当此鼠标位于元素上方时作用的CSS样式类。
|
Element
|
| |
addClassOnFocus
(
String className
)
: Ext.Element
Sets up event handlers to add and r...
Sets up event handlers to add and remove a css class when this element has the focus
设置事件句柄,当此元素得到焦点(focus)时作用的CSS样式类。
|
Element
|
| |
addClassOnClick
(
String className
)
: Ext.Element
Sets up event handlers to add and r...
Sets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect)
当鼠标在该元素上面按下接着松开(即单击效果),设置event handlers来添加和移除css类。
|
Element
|
| |
swallowEvent
(
String eventName,
[Boolean preventDefault],
String eventName,
[Boolean preventDefault]
)
: Ext.Element
Stops the specified event from bubb...
Stops the specified event from bubbling and optionally prevents the default action
事件上报(bubbling)的过程中停止特定的事件,阻止默认动作(可选的)。
|
Element
|
| |
parent
(
String selector,
Boolean returnDom
)
:
Gets the parent node for this eleme...
Gets the parent node for this element, optionally chaining up trying to match a selector
获取此节点的父级元素
|
Element
|
| |
next
(
String selector,
Boolean returnDom
)
:
Gets the next sibling, skipping tex...
Gets the next sibling, skipping text nodes
获取下一个兄弟节点,跳过文本节点
|
Element
|
| |
prev
(
String selector,
Boolean returnDom
)
:
Gets the previous sibling, skipping...
Gets the previous sibling, skipping text nodes
获取上一个兄弟节点,跳过文本节点
|
Element
|
| |
first
(
String selector,
Boolean returnDom
)
:
Gets the first child, skipping text...
Gets the first child, skipping text nodes
获取第一个子元素,跳过文本节点
|
Element
|
| |
last
(
String selector,
Boolean returnDom
)
:
|
Element
|
| |
appendChild
(
*/
)
: Ext.Element
Appends the passed element(s) to th...
Appends the passed element(s) to this element
传入一个或多个元素,加入到该元素
|
Element
|
| |
createChild
(
Object config,
HTMLElement insertBefore,
[Boolean returnDom],
Object config,
[HTMLElement insertBefore],
[Boolean returnDom]
)
: Ext.Element
Creates the passed DomHelper config...
Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.
automatically generated with the specified attributes.
传入一个DomHelper配置项对象的参数,将其创建并加入其到该元素;
可选地,可指定在其子元素(哪个子元素由参数传入)之前的地方插入。
参数项:
config : Object
DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be
automatically generated with the specified attributes.
insertBefore : HTMLElement
(optional) a child element of this element
returnDom : Boolean
(optional) true to return the dom node instead of creating an Element
传入一个DomHelper配置项对象的参数,将其创建并加入其到该元素;
可选地,可指定在其子元素(哪个子元素由参数传入)之前的地方插入。
config : Object
DomHelper元素配置项对象
insertBefore : HTMLElement
(可选的) 该元素的子元素
returnDom : Boolean
(可选的) true表示为返回DOM节点代替创建一个元素
返回:
Ext.Element The new child element this
|
Element
|
| |
appendTo
(
Mixed el,
)
: Ext.Element
Appends this element to the passed ...
Appends this element to the passed element
传入元素的参数,将该元素加入到传入的元素
|
Element
|
| |
insertBefore
(
Mixed el,
)
: Ext.Element
Inserts this element before the pas...
Inserts this element before the passed element in the DOM
传入元素的参数,将该元素的DOM插入其之前
|
Element
|
| |
insertAfter
(
Mixed el,
)
: Ext.Element
Inserts this element after the pass...
Inserts this element after the passed element in the DOM
传入元素的参数,将该元素的DOM插入其之后
|
Element
|
| |
insertFirst
(
Mixed/Object el,
)
: Ext.Element
Inserts (or creates) an element (or...
Inserts (or creates) an element (or DomHelper config) as the first child of the this element
插入(或创建)一个元素(或DomHelper配置项对象)作为该元素的第一个子元素
参数项:
el : Mixed/Object
The id or element to insert or a DomHelper config to create and insert
插入(或创建)一个元素(或DomHelper配置项对象)作为该元素的第一个子元素
@param {String/HTMLElement/Element/Object} el 可以是id;或是插入的元素;或是要创建和插入的DomHelper配置项对象
@return {Ext.Element} 新子元素
返回:
Ext.Element The new child this
|
Element
|
| |
insertSibling
(
*/ ,
String where,
Boolean returnDom,
[String where],
[Boolean returnDom]
)
: Ext.Element
Inserts (or creates) the passed ele...
Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element
插入(或创建)一个元素(或DomHelper配置项对象)作为该元素的兄弟节点。
参数项:
: */
@param {Mixed/Object/Array} el The id, element to insert or a DomHelper config to create and insert or an array of any of those.
where : String
(optional) 'before' or 'after' defaults to before
returnDom : Boolean
(optional) True to return the raw DOM element instead of Ext.Element
插入(或创建)一个元素(或DomHelper配置项对象)作为该元素的兄弟节点。
@param {String/HTMLElement/Element/Object} el 可以是id;或是插入的元素;或是要创建和插入的DomHelper配置项对象
where : String
(可选的) 'before' 或 'after' 默认为before
returnDom : Boolean
(可选的) true表示返回没加工过的DOM元素而非Ext.Element
返回:
Ext.Element the inserted Element this
|
Element
|
| |
wrap
(
Object config,
Boolean returnDom,
[Object config],
[Boolean returnDom]
)
:
Creates and wraps this element with...
Creates and wraps this element with another element
创建和打包(warp)该元素和其他元素
参数项:
config : Object
(optional) DomHelper element config object for the wrapper element or null for an empty div
returnDom : Boolean
(optional) True to return the raw DOM element instead of Ext.Element
创建和打包(warp)该元素和其他元素
config : Object
(可选的) 包裹元素(null的话则是一个空白的div)的DomHelper配置项对象
returnDom : Boolean
(可选的) true表示为返回没加工过的DOM元素,而非Ext.Element
返回:
|
Element
|
| |
replace
(
Mixed el,
Mixed el
)
: Ext.Element
Replaces the passed element with th...
Replaces the passed element with this element
用于当前这个元素替换传入的元素
|
Element
|
| |
replaceWith
(
Mixed/Object el
)
: Ext.Element
Replaces this element with the pass...
Replaces this element with the passed element
用传入的元素替换这个元素。
参数项:
el : Mixed/Object
新元素或是要创建的DomHelper配置项对象
返回:
|
Element
|
| |
insertHtml
(
String where,
String html,
Boolean returnEl,
String where,
String html,
Boolean returnEl
)
: HTMLElement
Inserts an html fragment into this ...
Inserts an html fragment into this element
插入HTML片断到这个元素
参数项:
where : String
Where to insert the html in relation to the this element - beforeBegin, afterBegin, beforeEnd, afterEnd.
html : String
The HTML fragment
returnEl : Boolean
True to return an Ext.Element
插入HTML片断到这个元素
where : String
要插入的html放在元素的哪里 - beforeBegin, afterBegin, beforeEnd, afterEnd.
html : String
HTML片断
returnEl : Boolean
true表示为返回一个Ext.Element
返回:
HTMLElement 被插入之节点(或最近的,如果超过一处插入的话)
|
Element
|
| |
set
(
Object o,
Boolean useSet,
Object o,
[Boolean useSet]
)
: Ext.Element
Sets the passed attributes as attri...
Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)
传入属性(attributes)的参数,使之成为该元素的属性(一个样式的属性可以是字符串,对象或函数function)
参数项:
o : Object
The object with the attributes
useSet : Boolean
(optional) false to override the default setAttribute to use expandos.
传入属性(attributes)的参数,使之成为该元素的属性(一个样式的属性可以是字符串,对象或函数function)
o : Object
属性对象
useSet : Boolean
(可选的) false表示为用expandos来重写默认的setAttribute
返回:
|
Element
|
| |
addKeyListener
(
*/ ,
Function fn,
Object scope,
Function fn,
[Object scope]
)
: Ext.KeyMap
Convenience method for constructing...
Convenience method for constructing a KeyMap
{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
构建KeyMap的快捷方式
参数项:
: */
@param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options:
{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
fn : Function
The function to call
scope : Object
(optional) The scope of the function
构建KeyMap的快捷方式
@param {Number/Array/Object/String} key 可侦听代码的数值、key代码的数组的字串符,或者是像这样的object: {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}
fn : Function
调用的函数
scope : Object
(可选的) 函数的作用域
返回:
Ext.KeyMap The KeyMap created
|
Element
|
| |
addKeyMap
(
Object config,
Object config
)
: Ext.KeyMap
Creates a KeyMap for this element
...
Creates a KeyMap for this element
为该元素创建一个KeyMap
参数项:
返回:
Ext.KeyMap The KeyMap created
|
Element
|
| |
isScrollable
(
)
: Boolean
Returns true if this element is scr...
Returns true if this element is scrollable.
返回true表示为该元素是可滚动的
|
Element
|
| |
scrollTo
(
String side,
Number value,
Boolean/Object animate,
String side,
Number value,
[Boolean/Object animate]
)
: Element
Scrolls this element the specified ...
Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().
滚动该元素到指定的滚动点(scroll point)。
它不会边界检查所以若果你滚动到一个不合理的值时它也会试着去做。
要自动检查边界,请使用scroll()。
参数项:
side : String
Either "left" for scrollLeft values or "top" for scrollTop values.
value : Number
The new scroll value
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
滚动该元素到指定的滚动点(scroll point)。
它不会边界检查所以若果你滚动到一个不合理的值时它也会试着去做。
要自动检查边界,请使用scroll()。
side : String
即可 "left" 对应scrollLeft的值,也可以 "top" 对于scrollTop的值.
value : Number
新滚动值
animate : Boolean/Object
(可选的) true表示为默认动画,或有一个标准元素动画配置的对象
返回:
|
Element
|
| |
scroll
(
String direction,
Number distance,
Boolean/Object animate,
String direction,
Number distance,
[Boolean/Object animate]
)
: Boolean
Scrolls this element the specified ...
Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
within this element's scrollable range.
was scrolled as far as it could go.
滚动该元素到指定的方向。须确认元素可滚动的范围,以免滚动超出元素可滚动的范围。
参数项:
direction : String
Possible values are: "l","left" - "r","right" - "t","top","up" - "b","bottom","down".
distance : Number
How far to scroll the element in pixels
animate : Boolean/Object
(optional) true for the default animation or a standard Element animation config object
was scrolled as far as it could go.
滚动该元素到指定的方向。须确认元素可滚动的范围,以免滚动超出元素可滚动的范围。
direction : String
可能出现的值: "l","left" - "r","right" - "t","top","up" - "b","bottom","down".
distance : Number
元素滚动有多远(像素)
animate : Boolean/Object
(可选的) true表示为默认动画,或有一个标准元素动画配置的对象
返回:
Boolean Returns true if a scroll was triggered or false if the element
|
Element
|
| |
translatePoints
(
Number/Array x,
Number y,
Number/Array x,
Number y,
)
: Object
Translates the passed page coordina...
Translates the passed page coordinates into left/top css values for this element
传入一个页面坐标的参数,将其翻译到元素的CSS left/top值。
参数项:
x : Number/Array
The page x or an array containing [x, y]
y : Number
The page y
传入一个页面坐标的参数,将其翻译到元素的CSS left/top值。
x : Number/Array
页面x or 数组 [x, y]
y : Number
页面 y
@param {Object} 包含left、top属性的对象,如 {left: (值), top: (值)}
返回:
Object An object with left and top properties. e.g. {left: (value), top: (value)}
|
Element
|
| |
getScroll
(
)
: Object
Returns the current scroll position...
Returns the current scroll position of the element.
返回元素当前滚动的位置。
参数项:
返回:
Object An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)}
|
Element
|
| |
getColor
(
String attr,
String defaultValue,
String prefix,
String attr,
String defaultValue,
[String prefix]
)
Return the CSS color for the specif...
Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values
are convert to standard 6 digit hex color.
color anims.
为指定的CSS属性返回CSS颜色。RGB、三位数(像#fff)和有效值都被转换到标准六位十六进制的颜色
参数项:
attr : String
The css attribute
defaultValue : String
The default value to use when a valid color isn't found
prefix : String
(optional) defaults to #. Use an empty string when working with
color anims.
为指定的CSS属性返回CSS颜色。RGB、三位数(像#fff)和有效值都被转换到标准六位十六进制的颜色
attr : String
CSS属性
defaultValue : String
当找不到有效的颜色时所用的默认值
prefix : String
(可选的) 默认为 #。应用到YUI颜色动画时须为空白字串符
返回:
|
Element
|
| |
boxWrap
(
String class,
[String class]
)
: Ext.Element
Wraps the specified element with a ...
Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a
gradient background, rounded corners and a 4-way shadow. Example usage:
// Basic box wrap
Ext.get("foo").boxWrap();
// You can also add a custom class and use CSS inheritance rules to customize the box look.
// 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
// for how to create a custom box wrap style.
Ext.get("foo").boxWrap().addClass("x-box-blue");
Note that there are a number of CSS rules that are dependent on this name to make the overall effect work,
so if you supply an alternate base class, make sure you also supply all of the necessary rules.
将指定的元素打包到一个特定的样式/markup块,渲染成为斜纹背景、圆角和四边投影的灰色容器。
用法举例:
// 基本box打包
Ext.get("foo").boxWrap();
// You can also add a custom class and use CSS inheritance rules to customize the box look.
// 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
// for how to create a custom box wrap style.
Ext.get("foo").boxWrap().addClass("x-box-blue");
注意有许多依赖该CSS规则来产生整体的效果。
所以你提供一个交替的基样式,必须保证你所提供的都是所需的规则。
|
Element
|
| |
getAttributeNS
(
String namespace,
String name,
String namespace,
String name
)
: String
Returns the value of a namespaced a...
Returns the value of a namespaced attribute from the element's underlying DOM node.
在DOM节点中的某个元素,返回其一个命名空间属性的值。
参数项:
返回:
String The attribute value
|
Element
|
| |
ep.on
(
String eventName,
Function fn,
Object scope,
Object options,
String eventName,
Function fn,
[Object scope],
[Object options]
)
Appends an event handler (shorthand...
Appends an event handler (shorthand for {@link #addListener}).
@member Ext.Element
@method on
加入一个事件句柄(addListener的简写方式)
@member Ext.Element
@method on
参数项:
eventName : String
The type of event to handle
fn : Function
The handler function the event invokes
scope : Object
(optional) The scope (this element) of the handler function
options : Object
(optional) An object containing standard #addListener options
@member Ext.Element
@method on
加入一个事件句柄(addListener的简写方式)
eventName : String
加入事件的类型
fn : Function
事件执行的方法
scope : Object
(可选的)函数之作用域 (这个元素)
options : Object
(可选的)标准的#addListener 配置项对象
@member Ext.Element
@method on
返回:
|
Element
|
| |
ep.un
(
String eventName,
Function fn,
String eventName,
Function fn
)
: Ext.Element
Removes an event handler from this ...
Removes an event handler from this element (shorthand for {@link #removeListener}).
从这个元素上移除一个event handler({@link #removeListener}的简写方式)
@member Ext.Element
@method un
参数项:
eventName : String
the type of event to remove
fn : Function
the method the event invokes
从这个元素上移除一个event handler(#removeListener的简写方式)
eventName : String
要移除事件的类型
fn : Function
事件执行的方法
@member Ext.Element
@method un
返回:
|
Element
|
| |
ep.autoBoxAdjust
(
)
true to automatically adjust width ...
true to automatically adjust width and height settings for box-model issues (default to true)
true表示为自动调整由box-mode问题引起的高度和宽度设置(默认true)。
|
Element
|
| |
El.get
(
Mixed el,
Mixed el
)
: Element
Static method to retrieve Element o...
Static method to retrieve Element objects.
Uses simple caching to consistently return the same object.
Automatically fixes if an object was recreated with the same id via AJAX or DOM.
@static
获取元素对象的静态方法。
如果是相同的对象的话,只是从缓存中提取。
Automatically fixes if an object was recreated with the same id via AJAX or DOM.
@static
参数项:
el : Mixed
The id of the node, a DOM Node or an existing Element.
@static
获取元素对象的静态方法。
如果是相同的对象的话,只是从缓存中提取。
Automatically fixes if an object was recreated with the same id via AJAX or DOM.
el : Mixed
节点的id,一个DOM节点或是已存在的元素。,
@return {Element} 元素对象
@static
返回:
Element The Element object (or null if no matching element was found)
|
Element
|
| |
El.fly
(
String/HTMLElement el,
String named,
String/HTMLElement el,
[String named]
)
: Element
Gets the globally shared flyweight ...
Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
the dom node can be overwritten by other code.
prevent conflicts (e.g. internally Ext uses "_internal")
获取共享元的元素,传入的节点会成为活动元素。
不保存该元素的引用(reference)-可由其它代码重写dom节点。
@static
参数项:
el : String/HTMLElement
The dom node or id
named : String
(optional) Allows for creation of named reusable flyweights to
prevent conflicts (e.g. internally Ext uses "_internal")
获取共享元的元素,传入的节点会成为活动元素。
不保存该元素的引用(reference)-可由其它代码重写dom节点。
el : String/HTMLElement
Dom节点或id
named : String
(可选的) 为避免某些冲突(如在ext内部的“_internal”),可另外起一个名字。
@static
返回:
Element 共享的Element对象(null表示为找不到元素)
|
Element
|
| |
Ext.get
(
Mixed el,
)
: Element
Static method to retrieve Element o...
Static method to retrieve Element objects. Uses simple caching to consistently return the same object.
Automatically fixes if an object was recreated with the same id via AJAX or DOM.
Shorthand of {@link Ext.Element#get}
获取元素对象的静态方法。
如果是相同的对象的话,只是从缓存中提取。
@member Ext
@method get
参数项:
el : Mixed
The id of the node, a DOM Node or an existing Element.
获取元素对象的静态方法。
如果是相同的对象的话,只是从缓存中提取。
@param {String/HTMLElement/Element} el 节点的id,一个DOM节点或是已存在的元素。,
@return {Element} Element对象
@member Ext
@method get
返回:
Element The Element object
|
Element
|
| |
Ext.fly
(
String/HTMLElement el,
String named,
String/HTMLElement el,
[String named]
)
: Element
Gets the globally shared flyweight ...
Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element -
the dom node can be overwritten by other code.
Shorthand of {@link Ext.Element#fly}
prevent conflicts (e.g. internally Ext uses "_internal")
@static
获取共享元的元素,传入的节点会成为活动元素。
不保存该元素的引用(reference)-可由其它代码重写dom节点。
{@link Ext.Element#fly}的简写方式。
@static
@member Ext
@method fly
参数项:
el : String/HTMLElement
The dom node or id
named : String
(optional) Allows for creation of named reusable flyweights to
prevent conflicts (e.g. internally Ext uses "_internal")
@static
获取共享元的元素,传入的节点会成为活动元素。
不保存该元素的引用(reference)-可由其它代码重写dom节点。
Ext.Element#fly的简写方式。
el : String/HTMLElement
Dom节点或id
named : String
(可选的)为避免某些冲突(如在ext内部的“_internal”),可另外起一个名字。
@static
@member Ext
@method fly
返回:
Element The shared Element object
|
Element
|