<html>
<head>
<script></script>
</head>
<body>
html内容html内容html内容html内容html内容
<script></script>
html内容html内容html内容
<div>
<script>1</script>html内容html内容html内容
</div>
<span>
<script>2</script>
</span>
<xxx><script>3</script></xxx>
</body>
<script></script>
</html>
如何过滤上述代码的 script标签及内容
条件1 保持html的结构
条件2 不能
方法不限 求思路
<head>
<script></script>
</head>
<body>
html内容html内容html内容html内容html内容
<script></script>
html内容html内容html内容
<div>
<script>1</script>html内容html内容html内容
</div>
<span>
<script>2</script>
</span>
<xxx><script>3</script></xxx>
</body>
<script></script>
</html>
如何过滤上述代码的 script标签及内容
条件1 保持html的结构
条件2 不能
方法不限 求思路