Can i manipulate an external HTML document with JQuery?

前端 未结 2 1461
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 04:57

I would like to sanitize a HTML document (created in google docs) so I can publish it on my CMS.

I have the source document in a string, from to , with header, style, b

2条回答
  •  萌比男神i
    2021-01-29 05:48

    Try like this:

    var gdoc = '
    Bar
    '; var data = $('
    ').html(gdoc).find('#foo').html(); alert(data);

    Demo.

提交回复
热议问题