PDA

View Full Version : How to get HTML content in a component



jiancha
2 Dec 2011, 1:31 AM
hello,

I created a component with "{xtype: 'component', html: '0',id: 'mycom'}" in a panel.
and I want to click a button later by using Ext.getCmp('mycom').getEl().getHTML() and return me the content '0' without tag div, but it shows me "<div class= .....>0</div>".

How can I get the content of html without <div></div> ?

thanks,

redraid
2 Dec 2011, 1:44 AM
Ext.getCmp('mycomp').getEl().dom.innerHTML

jiancha
3 Dec 2011, 3:03 PM
thanks for your answer !