一:web总结

Posted itzlg

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了一:web总结相关的知识,希望对你有一定的参考价值。

一:web总结

1.jsp页面知识点巩固
1.1字符串数字格式化转换
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

整数带千分符显示:
<fmt:formatNumber?value="${num}"?type="number"/>

整数显示:
<fmt:formatNumber?value="${num}"?pattern="#"?type="number"/>

两位小数舍入显示:
<fmt:formatNumber?value="${num}"?pattern="#.##"?type="number"/>

两位小数舍入,不足两位小数补0显示:
<fmt:formatNumber?value="${num}"?pattern="0.00"?type="number"/>

货币显示:(与number类似扩展pattern)
<fmt:formatNumber?value="${num}"?type="currency"/>

百分数显示:(与number类似扩展pattern)
<fmt:formatNumber?value="${num}"?type="percent"/>
1.2 jstl标签库与EL标签库
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

//数据回显
<select name="Longflag" class="combox">
    <option value="0" ${0 eq been.longflag ? 'selected="selected"' : ''}>临时</option>
    <option value="1" ${1 eq been.longflag ? 'selected="selected"' : ''}>长期</option>
</select>

<select name="Longflag" class="combox">
    <option value="0" <c:if test="${0 eq been.longflag}">selected</c:if> >临时</option>
    <option value="1" <c:if test="${1 eq been.longflag}">selected</c:if> >长期</option>
</select>

//条件标签
<c:if test='${flag == 1}'></c:if>   //错误写法 test='${} ' 后有空格
<c:choose>
    <c:when test='p1.test_type.equals(p.test_type) and p1.test_item.equals(p.test_item)'></c:when>
    <c:when test=''></c:when>
    <c:otherwise></c:otherwise>
</c:choose>

//循环标签
<c:foreach item='${performanceList}' var='performance'></c:foreach>
2.mybatis知识巩固

后续。。。

以上是关于一:web总结的主要内容,如果未能解决你的问题,请参考以下文章

几条jQuery代码片段助力Web开发效率提升

原创概述总结基于前后端的Web微博应用

VsCode 代码片段-提升研发效率

Web Spider Fiddler - JS Hook 基本使用

python常用代码片段总结

BootStrap有用代码片段(持续总结)