I'd like to remove only the first two BR tags with jquery.<div id="system"><BR CLEAR="ALL"><BR>// I want to remove both BR....<BR>......<BR>I assume something like this. But I am not sure.$('#system br').remove();Could anyone tell me how to do this please? 解决方案 Use :lt():$('#system br:lt(2)').remove();:lt() takes a zero-based integer as its parameter, so 2 refers to the 3rd element. So :lt(2) is select elements "less than" the 3rd.Example: http://jsfiddle.net/3PJ5D/ 这篇关于如何使用jQuery删除前两个BR标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 13:13