问题:
I have a layout similar to this: 我的布局类似于:
<div id="..."><img src="..."></div>
and would like to use a jQuery selector to select the child img
inside the div
on click. 并且想使用jQuery选择器在img
选择div
的子img
。
To get the div
, I've got this selector: 为了得到div
,我有这个选择器:
$(this)
How can I get the child img
using a selector? 如何使用选择器获取子img
?
解决方案:
参考一: https://stackoom.com/question/1Hkt/如何获得-this-选择器的子节点参考二: https://oldbug.net/q/1Hkt/How-to-get-the-children-of-the-this-selector
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4298283