开发者

Sencha show / hide element

I have a simple form, and I work with开发者_Go百科 a button that has a handler to get the submit. When the user clicks that button, I want to show a 'DIV'-element.

How is it possible to show / hide a specific element in Sencha?

Thanks in advance!


To show a component:

Ext.getCmp('YourDivID').show();

To hide a component:

Ext.getCmp('YourDivID').hide();

Before this, you have to of course create a component with YourDivID.


You have to use getCmp in order to select an element,

but you have to use Ext.select() in order to select an HTML element like divs.

Example usage:

Ext.select("#yourdiv").hide();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜