Saturday, August 30, 2014

Remove all html tags in string using jquery


1.Add Jquery Library to your page and write following code in document.ready function.

using bellow code we get pain text from the html :


var myContent = '
Hello world!
';

alert($(myContent).text());

alert message show : Hello word!

No comments:

Post a Comment