jQuery change child text

前端 未结 5 1395
不知归路
不知归路 2021-01-17 19:51

I have a jquery function that changes a text inside a element using a jquery \"text\" function. Inside this td element is child \"a\" tag like this.

5条回答
  •  甜味超标
    2021-01-17 19:55

    If you want to change text in a select menu, you can do this by giving an option an id or class.

         $('selector').children('option[id=option_id]').text('new text');
    

提交回复
热议问题