使用jquery解析HTML

Tho*_*mas 3 jquery

假设在变量html中保存为

var vhtm="<div><div id='test'>zebra</div><div id='foo'>here is my many other html content</div></div>";
Run Code Online (Sandbox Code Playgroud)

我想在jquery的帮助下解析存储在变量中的上述html.我需要通过id提取特定的div并包含其内容.返回的结果是

<div id='foo'>here is my many other html content</div>
Run Code Online (Sandbox Code Playgroud)

所以我需要找到像id ='foo'这样的id

请帮我解析如上所述的jquery.

gio*_*_13 5

尝试这样的事情:

$(vhtml).find('#foo');
Run Code Online (Sandbox Code Playgroud)