How to find element without use ID

前端 未结 5 479
甜味超标
甜味超标 2021-01-27 14:43

I have DOM element in array

this.object = 
     
\"color1 text1
5条回答
  •  心在旅途
    2021-01-27 15:10

    Use jQuery to avoid any cross browser issues. Assuming you have the div, use div.find('span:eq(1)');

    Working example.

    Working example for multiple items.

    Another example showing the text being updated.

提交回复
热议问题