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

JSTL 联合字符fn:join()
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<%
String[] ss=new String[]{"新乡","郑州","洛阳"};String sss="新乡,洛阳,郑州,鹤壁";
   application.setAttribute("string",ss);
%>
${fn:join(string,'-->') }
</body>

</html>


//结果输出新乡-->郑州-->洛阳