fn:toUpperCase()函数
JSTL fn:toUpperCase() 函数将指定字符串中的所有字符转为大写。
页面输出内容如下:
语法
JSP fn:toUpperCase() 函数的语法如下。String fn:toUpperCase(String sourceStr)其中,sourceStr 为指定的字符串。
示例
下面为 fn:toUpperCase() 函数的简单实例。
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<title>编程帮(www.biancheng.net)</title>
</head>
<body>
<c:set var="msg" value="Welcome to bianchengbang" />
${fn:toUpperCase(msg)}
</body>
</html>
页面输出内容如下:
WELCOME TO BIANCHENGBANG
ICP备案:
公安联网备案: