Replace multiple
's with only one

前端 未结 9 2129
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 12:55

How do I use JavaScript to detect




to become one


?

I trie

9条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 13:07

    What is the point of sending HTML, which is in a form that you don't want, to the client browser and making it run JavaScript code to clean it up? This looks like a bad design.

    How about fixing all your static HTML, and HTML generation, so that these superfluous
    elements do not occur in the first place?

    If you use JavaScript to modify the document object, do so for dynamic effects that cannot be achieved in any other way.

提交回复
热议问题