日期:2014-05-16 浏览次数:20400 次
<script type="text/javascript" > h='<html id="asd">asdsa12</html>' //var reg= new RegExp('<\\w+>.*(?=<\/html>)','g') var tmp=h.match(/<(\w+)[^>]*>.*(?=<\/\1>)/g); alert(tmp) tmp=h.replace(/<(\w+)[^>]*>(.*)(<\/\1>)/g,"$2"); alert(tmp) </script>