Home >Web Front-end >JS Tutorial >Regular matching of html tags_javascript skills

Regular matching of html tags_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:27:42831browse

>" name= spanName />

<script> function htmlTag() { re = /<(\/\s*)?((\w+:)?\w+)(\w+(\s*=\s*((["'])(\\["'tbnr]|[^\7])*?\7|\w+)|.{0})|\s)*?(\/\s*)?>/ig return htmlCode.value.match(re) } </script>


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn