platform.extractTextFromHtml

The 'extractTextFromHtml' function parses the given HTML source, and returns the plain text excluding HTML formatting tags.
extractTextFromHtml提取HTML中的纯文本

  • Prototype: platform.extractTextFromHtml(sHtmlText);
  • Parameters:
    1. sHtmlText: the HTML source to be parsed;
      HTML源
  • Return Value: the plain text without HTML formatting tags is returned;
  • Example:
    var sTxt=platform.extractTextFromHtml('<p>Hello world</p>');