XIYUETA.COM
源代码:
点击运行
<script src="../dist/xiyueta.min.js?v31"></script> <script> /* $.handle() 处理匹配遍历xiyueta对象,返回数组对象 $.log() 在浏览器里显示内容 == document.write() */ var html = '<div>aa</div>\ <div>bb</div>\ <div class="cc">cc<div>this a</div><div>this b</div><span>ddd</span></div>\ <div>dd</div>\ <div class="cc">11</div>\ <div>22</div>\ <img src="1.jpg">\ <img src="/2.jpg" class="i">\ <img src="../3.jpg">\ <img src="./4.jpg" class="i">' $().parse(html); //解析html var list = xiyueta("|img|script|").handle("src", "clean", "http://www.xiyueta.com/doc/index.html"); $.log(list) </script>
运行结果