6/11/2012

Remove Html Tag with jQuery

The example below show how to remove HTML tags from strings with jQuery

 

INPUT:         <b>We</b>love<span>jQuery.</span>

OUTPUT:   We love jQuery.

jQuery source:

var NewString = OriginalString.replace(/(<([^>]+)>)/ig, "");

Thumbs up

Categories: ,
If You Enjoyed This Post Please Take 5 Seconds To Share It.

0 comments:

Post a Comment

 
  • Followers