日期:2014-05-16  浏览次数:20347 次

jstl截取字符串的3种有效方法
<%@ taglib
	uri="http://java.sun.com/jsp/jstl/functions"
	prefix="fn"
%>


2012-03-14 10:01:04
<input
										type="text"
										name="proclog.lastTime"
										class="input"
										readonly="readonly"
										onClick="WdatePicker();"
										value="${fn:substring(proclog.lastTime,0,10)}"
									/>

2012-03-14

<input
										type="text"
										name="proclog.time"
										class="input"
										readonly="readonly"
										onClick="WdatePicker();"
										value="${fn:substringBefore(proclog.time,' ')}"
									/>

2012-03-14

<input
										type="text"
										name="proclog.time"
										class="input"
										readonly="readonly"
										onClick="WdatePicker();"
										value="${fn:trim(fn:substringAfter(proclog.time,' '))}"
									/>

10:01:04