【发布时间】:2014-12-30 04:11:06
【问题描述】:
我在 jsp 中得到的值为 2.2222222E7。但我输入了 22222222。如何解决? AM 使用双精度数据类型。请给我你的建议来解决我的问题。我可以使用javascript解决吗?我该怎么办?
jsp页面:
<table id="payout" class="display" style="float:left; width: 100%;border-radius:
5px 5px 5px 5px;
box-shadow: 2px 2px 6px #666666;-moz-box-sizing: none;" border=1
data="${payout}">
<thead style="color: red">
<tr>
<td class="heading">Charge</td>
<td class="heading">Cost Before Discount</td>
<td class="heading">After Plan Discount</td>
<td class="heading">After Booking Discount</td>
</tr>
</thead>
<tbody>
<c:forEach items="${payouts}" var="payout" varStatus="row">
<tr>
<td >Base Cost</td>
<td>${payout.baseCost.costBeforeDiscount}</td>
<td>${payout.baseCost.afterPlanDiscount}</td>
<td>${payout.baseCost.afterBookingDiscount}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
【问题讨论】:
-
接受输入的代码在哪里,该代码的哪一部分与输出相关?
-
快速说明为什么不应该使用双精度货币 - stackoverflow.com/questions/1661273/…
-
值没有错。你只是没有指定你想要的格式。
标签: java javascript jsp