How to select this specific td element and its text with Jquery

前端 未结 6 462
温柔的废话
温柔的废话 2020-12-19 18:39

I want to change the \"Yes! Pick me\" into \"Picked\" with Jquery in the following HTML structure, I used $(\'#myDiv>table>tr>td>table>tr\').eq(1).text(

6条回答
  •  一向
    一向 (楼主)
    2020-12-19 19:38

    You can try:

    $("td:contains('Yes! Pick me!')").text("Picked"); ​
    

提交回复
热议问题