3
이 코드는 .jsp
파일 <head>
에 있습니다.jsp의 조건문이 작동하지 않습니다.
<c:if test="${pageId eq 'how-credit-affects-interest-rate' || pageId eq 'taking-control-credit-score'}">
Display text here if conditional is true.
</c:if>
그리고 또한 내가 브라우저에서 pageId
를 넣어 경우, 대신 ||
의 or
으로 시도 :
<p>
<strong>
Some text here
<br>
<c:if test="${pageId == 'how-credit-affects-interest-rate' || pageId == 'taking-control-credit-score'}">
Display text here if conditional is true.
</c:if>
</strong>
</p>
이미이 작업을 수행하여 시도 :
<script type="text/javascript">
var pageId = "<c:out value="${pageData.contentId}" />";
</script>
그리고 나는 이것이이 콘솔, 나는 적절한 결과를 얻을 수 있지만 여전히 작동하지 않습니다.
왜 이런 일이 벌어 질 수 있습니까?
시도? – NietzscheProgrammer
시도해 볼 예제가 추가되었습니다. – Taylor