Remove non breaking space ( ) from between elements using jquery

前端 未结 1 1044
走了就别回头了
走了就别回头了 2021-01-07 09:14

How can I use jquery to remove non-breaking spaces (nbsp) which appear between html elements?

So, for example, the following code is generated by a cms:



        
1条回答
  •  隐瞒了意图╮
    2021-01-07 09:37

    var div = "
    content content
    "; var newdiv = div.replace(/ /g,'');

    demo

    0 讨论(0)
提交回复
热议问题