小白教程
所有教程
关于
Search
172.69.58.117
172.69.58.117
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Jstl function touppercase”的源代码
本页内容
上一节:
Jstl_function_tolowercase
下一节:
Jstl_function_trim
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:fn:toUpperCase()}}[[Category:jsp jstl|56]] = fn:toUpperCase()函数 = [[jsp jstl|JSP 标准标签库]] fn:toUpperCase() 函数将一个字符串中的所有字符转为大写。 === 语法 === fn:toUpperCase() 函数的语法如下: <sample title="" desc="" lang="jsp" hererun="1"> ${fn:toUpperCase(<string>)} </sample> === 实例演示 === 以下实例演示了这个函数的功能: <sample title="" desc="" lang="jsp" hererun="1"> <%@ 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" %> <html> <head> <title>使用 JSTL 函数</title> </head> <body> <c:set var="string1" value="I am from xiaobai"/> <c:set var="string2" value="${fn:toUpperCase(string1)}" /> <p>字符串为 : ${string2}</p> </body> </html> </sample> 运行结果如下: <sample title="" desc="" lang="jsp" hererun="1"> 字符串为 : I AM FROM XiaoBai.Wang </sample> [[jsp jstl|JSP 标准标签库]]
返回至“
Jstl function touppercase
”。
上一节:
Jstl_function_tolowercase
下一节:
Jstl_function_trim