Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人知道如何检查代码是否<script>以</script>. 这只是一种检查代码是否可以插入 HTML 以避免破坏网站的方法。
<script>
</script>
到目前为止,我已经尝试查看是否<script>存在,但我需要检查打开和关闭。
任何帮助都会很酷:)
你可以用这个..
<script[^>]*>([\s\S]*?)<\/script>