zoukankan      html  css  js  c++  java
  • <bean:write/>标签的format属性

    这个属性可以解决类似这样的问题,比如,从数据库取得的是日期型的变量,想要显示为类似这样的格式:XX年XX月XX日.可以用这个属性.

    具体用法如下:
    1.在资源文件里添加如下键值:
    global.formatDateTimeAll=yyyy年MM月dd日 HH:mm:ss
    global.formatDateTime=yyyy年MM月dd日 HH:mm
    global.formatDate=yyyy年MM月dd日
    global.formatMonth=yyyy年MM月
    global.formatYear=yyyy年

    2.在JSP页面这样写
    <bean:write name="aPicture" property="createTime" formatKey="global.formatDateTime" />

    或者可以如下应用
    <input type="text" id="startDate" name="startDate" readonly value="<bean:write name="acsGroupForm" property="startDate" format="yyyy-MM-dd HH:mm:ss"/>">

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    Pillar
    Minion配置文件
    Master配置文件
    Grains
    常见的散列函数
    数据结构散列表
    转载:数据结构 二项队列
    转载:数据结构 左式堆
    数据结构 d-堆
    二叉堆的简单介绍
  • 原文地址:https://www.cnblogs.com/shipeng22022/p/4614149.html
Copyright © 2011-2022 走看看