下列代码是ICoupons所显示的值。 想要添加 一个 当他的值为0时候 提示:暂无数据 应该怎么写

<s:iterator value="#request.interestCoupons" var="ICoupons">
            <div class="pbc">
                <div id="coupons-list">
                    <div class="pbc-right" style="margin-left: 6px;;">
                        <div class="pbc-right-left investment-center-status-${ICoupons.status}">
                            <a class="coupons-item" data-id="${coupon.id}" data-invest="${coupon.investamount}" data-coupon="${coupon.couponamount}">
                                <p style="color: #333;font-size: 15px;" >${ICoupons.coupontypename}</p>
                                <p style="font-size: 11px;color:#333">投资金额<span>${ICoupons.investamount}</span>元可用此卷</p>
                                有效期: <span>${ICoupons.startDate}~${ICoupons.endDate}</span>
                            </a>
                        </div>
                        <div class="content-item">
                            <s:if test="#ICoupons.status==1">
                                <div class="pbc-right-right pbc-right-bg item-coupon investment-status-${ICoupons.status}">
                                    <div class="item-1">
                                        <span>${ICoupons.rate}</span>%
                                        <p style="color: #fff;margin-top: 12px;">立即使用</p>
                                    </div>
                                </div>
                            </s:if>
                            <s:elseif test="#ICoupons.status==2">
                                <div class="pbc-right-right pbc-right-bg item-coupon-1 investment-status-${ICoupons.status}">
                                    <div class="item-1">
                                        <span>${ICoupons.rate}</span>%
                                        <p style="color:#fff;margin-top: 12px;">已使用</p>

                                    </div>
                                </div>
                            </s:elseif>
                            <s:elseif test="#ICoupons.status==3">
                                已过期
                            </s:elseif>
                            <s:else>
                                错误
                            </s:else>
                        </div>
                    </div>
                </div>
            </div>
        </s:iterator>


_天蝎座的你_0
浏览 923回答 1
1回答

yemaa

用JS判断是否有值,没值就给你需要改成没有数据的标签的值进行innerHTML赋值
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java