jQuery remove tag from HTML String without RegEx

前端 未结 6 1694
情话喂你
情话喂你 2020-12-05 14:25

So I have following string:

var s = \'Some Text Some other Text\';

The result should be a string with the content

6条回答
  •  [愿得一人]
    2020-12-05 14:43

    Just remove html tag like this

    DEMO

    var s = 'Some Text Some other Text';
    var r = /<(\w+)[^>]*>.*<\/\1>/gi;
    s.replace(r,"");
    

    Answer given over here :http://www.webdeveloper.com/forum/showthread.php?t=252483

提交回复
热议问题