赞
踩
正常直接console dom节点
代码改成
- var parser = new DOMParser();
- var docDom = parser.parseFromString(testHtml, 'text/html');
- console.log(docDom)
- let htmlHeader = ref< HTMLElement | null>(null)
- let htmlBoby = ref< HTMLElement | null>(null)
- htmlHeader.value = docDom.head
- htmlBoby.value = docDom.body
-
- // console.log([htmlHeader.value])
- console.log([htmlBoby.value])
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。