Remove image elements from string

前端 未结 8 2277
独厮守ぢ
独厮守ぢ 2021-02-20 16:47

I have a string that contains HTML image elements that is stored in a var.

I want to remove the image elements from the string.

I have tried: var content =

8条回答
  •  北恋
    北恋 (楼主)
    2021-02-20 17:29

    Does this work for you?:

    var content = content.replace(/]*>/g, '')
    

提交回复
热议问题