usingmodify.jsp

来自「jsp动态网站开发与实例(第3版) 源码」· JSP 代码 · 共 24 行

JSP
24
字号
	<%@page contentType="text/html"%>
	<%@page pageEncoding="Ms950"%>
	<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
	<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
	<html>
	    <head><title>变动字符串内容</title></head>
	    <body>
	    字符串:The JSTL functions<br>
	    转换小写(fn:toLowerCase):
	    ${fn:toLowerCase("The JSTL functions ")}<br>
	    转换大写(fn:toUpperCase):
	    ${fn:toUpperCase("The JSTL functions ")}<br>
	    
	    分割与结合字符串(fn:split/fn:join)
	    <c:set var="splitString" 
	 		 value='${fn:split("The JSTL functions "," ")}' />
	    ${fn:join(splitString,"-")}<br>
	    
	    置换JSTL为Java(fn:replace):
	    ${fn:replace("The JSTL functions ","JSTL","Java")}<br>
	    
	    </body>
	</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?