html 中根据后台参数显示 相应的样式 EL表达式

                            <li><a class="${return_product_statu==-1||return_product_statu==null?'switch_xz':'none'}" href="front/seller_showProductsByStatus.do?product_statu=-1">所有</a></li>
                            <li><a class="${return_product_statu== 3?'switch_xz':'none'}" href="front/seller_showProductsByStatus.do?product_statu=3">等待上架</a></li>
                            <li><a class="${return_product_statu== 1?'switch_xz':'none'}" href="front/seller_showProductsByStatus.do?product_statu=1">出售中</a></li>
                            <li><a class="${return_product_statu== 4?'switch_xz':'none'}" href="front/seller_showProductsByStatus.do?product_statu=4">已卖完</a></li>
                            <li><a class="${return_product_statu== 0?'switch_xz':'none'}" href="front/seller_showProductsByStatus.do?product_statu=0">已收货</a></li>
return_product_statu是request中的参数,用EL表达式得到,根据其值控制CLASS.默认的是第一个
posted @ 2014-03-13 16:17  shenghaishiweini  阅读(810)  评论(0编辑  收藏  举报