I have a parent div with four children div. How do I select the second sibling when there is no class given?
<div class="parent">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
$('//div[@class="parent"]/div[2]')
这样可以直接选择第二个孩子
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.