strip HTML tags using javascript

by Selva 2009-07-21 18:26:54

Here is the javascript code for striping HTML tags in a string :


String.prototype.stripHTML = function()
{
var matchTag = /<(?:.|s)*?>/g;
return this.replace(matchTag, "");
}

Tagged in:

1859
like
0
dislike
0
mail
flag

You must LOGIN to add comments