I'm trying to convert HTML to plain text, is it efficient? Am I missing something?
txt = $ ("body"). ("Script, Noscript, Style, Hidden"). Remove (). End (). Text ();
Thanks!
HTML is text.
Edit Try it ...
// Get the existing body text html html = $ ("body"). (); // Create a new jQuery object outside body text and delete the desired elements. Var text = $ (html) .remove ("script, noscript, style, hidden"). Text ();
No comments:
Post a Comment