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.
我有 bal = -1000.00 我想在 jsp 中显示为 (1000.00)。
<c:when test="${((bal) < 0)}"> <(${-1*bal})/> </c:when>
输出 ID (1000)
小数被丢弃。
使用:
<fmt:formatNumber type="currency" minFractionDigits="2" value="${bal}" />
当 bal 为 -1000.00 时,将得到你 '(1000.00)'