从jQuery对象获取基本元素 [英] Getting the base element from a jQuery object
本文介绍了从jQuery对象获取基本元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这里努力寻找正确的术语,但是如果您有jQuery对象...
I'm struggling to find the right terminology here, but if you have jQuery object...
$('#MyObject')
...是否可以提取基础元素?含义,等同于:
...is it possible to extract the base element? Meaning, the equivalent of this:
document.getElementById('MyObject')
推荐答案
是,请使用.get(index)
.根据文档:
.get()
方法授予对每个jQuery对象基础的DOM节点的访问权限.
The
.get()
method grants access to the DOM nodes underlying each jQuery object.
这篇关于从jQuery对象获取基本元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文