나는이 html 발췌 문장을 가지고 있습니다. 나는 태그를 제거하려면이확대 HTML 태그 제거
<html>
<body>
<div class="content">lorem ipsum</div>
</body>
</html>
내가 발견하지 못했습니다 enlive 도우미 함수가 될 그 조각을 구문 분석 원하고 자바 스크립트 태그
<html>
<body>
<div class="content">lorem ipsum</div>
<script src="/js/jquery.js" type="text/javascript"></script>
<script src="/js/bootstrap.min.js" type="text/javascript"></script>
</body>
</html>
없이 HTML을 방출한다.
예를 들어 해결책을 찾아 냈습니다. 그래서 나는이 코드를 작성하고 난 nil returning
기능을 사용하는 것입니다 조건부로 렌더링 된 페이지의 일부 태그를 제거해야 할 때 JS는
(html/deftemplate template-about "../resources/public/build/about/index.html"
[]
[:script] (fn js-clear [& args] nil)
)
고맙습니다. – calvin91