how to remove   and
using javascript or jQuery?

前端 未结 8 1083
心在旅途
心在旅途 2020-12-06 05:38

I have written the following code. But it is removing only   not

var docDesc = docDescription.replace(/(&nb         


        
8条回答
  •  醉梦人生
    2020-12-06 05:58

    Try:

    var docDesc = docDescription.replace(/[&]nbsp[;]/gi," "); // removes all occurrences of  
    docDesc = docDesc.replace(/[<]br[^>]*[>]/gi,"");  // removes all 

提交回复
热议问题