Stupid question... Ext.getDom? - Ext JS

本文探讨了Ext.getDom和Ext.get两个方法的区别。Ext.getDom用于获取实际的DOM元素,而Ext.get则返回一个Ext.Element对象。文章通过代码示例详细解释了两者的用法及区别。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Alright, so been scratching my head a bit. I can't seem to find any documentation or definition in the code for Ext.getDom, yet I see it being called from a ton of Ext methods...

What is the difference between Ext.getDom and Ext.get, and where can i find the code/docs for this func?
Reply With Quote
  #2  
Old 03-16-2007, 09:05 AM
Default

        getDom : function(el){
            if(!el){
                return null;
            }
            return el.dom ? el.dom : (typeof el == 'string' ? document.getElementById(el) : el);
        },
Gets a dom element from a String/HtmlElement/Ext.Element
Reply With Quote
  #3  
Old 03-16-2007, 09:06 AM
Default

Ext.getDom gets the actual DOM element while Ext.get gives you an Ext.Element object
Reply With Quote
  #4  
Old 03-16-2007, 09:07 AM
Default

I figured as much, thanks for the info!
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值