ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### - Creating a new DOM element from an HTML string using built-in DOM methods or prototype ```javscript var xmlString = "<div id='foo'><a href='#'>Link</a><span></span></div>" , parser = new DOMParser() , doc = parser.parseFromString(xmlString, "text/xml"); doc.firstChild // => <div id="foo">... doc.firstChild.firstChild // => <a href="#">... ```