How to remove the first two BR tags with jquery?

前端 未结 6 1331
萌比男神i
萌比男神i 2021-01-13 05:14

I\'d like to remove only the first two BR tags with jquery.



// I want to remove both BR. ... <
6条回答
  •  旧时难觅i
    2021-01-13 05:43

    Try

    $('#system br:first').remove();
    $('#system br:first').remove();
    

    The first line removes the first br, then the second br becomes the first, and then you remove the first again.

提交回复
热议问题