XIYUETA.COM
源代码:
点击运行
<script src="https://www.xiyueta.com/js/xiyueta.min.js?v36"></script> <script> /* $.load() 加载并解析html .printAll() 打印匹配元素集中全部元素的HTML内容 */ var html = "<body>aaa<div>xiyueta<div>\n作者<div style='color:red'>小云\n</div></div></div><div>网址:xiyueta.com</div>bbbb</body>" $.load(html); //解析html document.write($("div").printAll("format|color")); </script>
运行结果