⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fn_length.jsp

📁 jsp入门级代码
💻 JSP
字号:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html;charset=GBK"%>
<%@ page isELIgnored="false" %>
<html>
<head>
  <title>JSTL: Funciton -- fn:length</title>
</head>
<body bgcolor="#FFFFFF">
<h3>fn:length()</h3>
<hr>
<c:set var="s1" value="There is a castle on a cloud"/>
<%
 String[] customers = {"tom","johnson","jake"};
 session.setAttribute("customers",customers);
%>
<table cellpadding="5" border="1">
  <tr>
    <th align="left">Input String</th>
    <th>Result</th>
  </tr>
  <tr>
    <td>${s1}</td>
    <td>${fn:length(s1)}</td>
  </tr>
  <tr>
    <td>${customers}</td>
    <td>${fn:length(customers)}</td>
  </tr>
  <tr>
    <td>null</td>
    <td>${fn:length(undefined)}</td>
  </tr>
  <tr>
    <td>empty string</td>
    <td>${fn:length("")}</td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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