黑马程序员技术交流社区
标题:
split
[打印本页]
作者:
tfy
时间:
2012-12-29 23:44
标题:
split
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<%
pageContext.setAttribute("str","2010-10-12");
%>
${ fn:split(str,"-")[0]}<br/>
${ fn:split(str,"-")[1]}<br/>
${ fn:split(str,"-")[2]}<br/>
</body>
</html>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2