青海高等级公路建设管理局网站,顺德大良那里做网站好,住房与城乡建设部网站,素材下载解析接口网站开发javaScript的if else大家都不会陌生#xff0c;但可能很多小伙伴并不知道在jsp文件里#xff0c;el表达式的if else是怎么写的#xff0c;下面安利给各位小伙伴。 el表达式 if 代码示例示例1c:if test${jsonObject.transportTypeName eq 火车}li但可能很多小伙伴并不知道在jsp文件里el表达式的if else是怎么写的下面安利给各位小伙伴。 el表达式 if 代码示例 示例1 c:if test${jsonObject.transportTypeName eq 火车}lispan运费/spanspan classorderdetails-jiage-10/span/li
/c:if示例2 c:if test${empty currentRoleId} currentRoleId为空
/c:if
c:if test${not empty currentRoleId} currentRoleId不为空
/c:if 示例3 c:when test${condition1} condition1为true /c:when el表达式 if else代码示例 使用choose when otherwise 示例1 c:choosec:when test${jsonObject.transportTypeName eq 火车 || 散船 || 自提 || 集装箱 || 集装箱自提 || 汽车}lispan运费/spanspan classorderdetails-jiage-10/span/li/c:whenc:otherwiselispan运费/spanspan classorderdetails-jiage-1¥${jsonObject.deliveryFee null ? 0.00 : jsonObject.deliveryFee}/span/li/c:otherwise
/c:choose示例2 c:choose
c:when test${var.index % 2 0}*
/c:when
c:otherwise*
/c:otherwise
/c:choose示例3 c:choosec:when test${Object.Name ! null}*/c:whenc:otherwise*/c:otherwise
/c:choose转载于:https://www.cnblogs.com/master-yao/p/8195585.html