el表达式中的集合是什么,el表达式淘汰了吗

首页 > 教育 > 作者:YD1662024-06-24 06:43:12


EL函数库(fn方法库)

el表达式中的集合是什么,el表达式淘汰了吗(17)

<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

contains:${fn:contains("zhongfucheng",zhong )}<br> containsIgnoreCase:${fn:containsIgnoreCase("zhongfucheng",ZHONG )}<br> endsWith:${fn:endsWith("zhongfucheng","eng" )}<br> escapeXml:${fn:escapeXml("<zhongfucheng>你是谁呀</zhongfucheng>")}<br> indexOf:${fn:indexOf("zhongfucheng","g" )}<br> length:${fn:length("zhongfucheng")}<br> replace:${fn:replace("zhongfucheng","zhong" ,"ou" )}<br> split:${fn:split("zhong,fu,cheng","," )}<br> startsWith:${fn:startsWith("zhongfucheng","zho" )}<br> substring:${fn:substring("zhongfucheng","2" , fn:length("zhongfucheng"))}<br> substringAfter:${fn:substringAfter("zhongfucheng","zhong" )}<br> substringBefore:${fn:substringBefore("zhongfucheng","fu" )}<br> toLowerCase:${fn:toLowerCase("zhonGFUcheng")}<br> toUpperCase:${fn:toUpperCase("zhongFUcheng")}<br> trim:${fn:trim(" zhong fucheng ")}<br> <%--将分割成的字符数组用"."拼接成一个字符串--%> join:${fn:join(fn:split("zhong,fu,cheng","," ),"." )}<br>

el表达式中的集合是什么,el表达式淘汰了吗(18)

<% User user = new User(); String likes[] = {"sing"}; user.setLikes(likes); //数据回显 request.setAttribute("user",user); %> <%--java的字符数组以","号分割开,首先拼接成一个字符串,再判读该字符串有没有包含关键字,如果有就checked--%> <input type="checkbox"${ fn:contains(fn:join(user.likes,","),"sing")?'checked':'' }>唱歌 <input type="checkbox"${ fn:contains(fn:join(user.likes,","),"dance")?'checked':'' }>跳舞

el表达式中的集合是什么,el表达式淘汰了吗(19)

原文链接:https://dwz.cn/bOdF7S6R

作者:Java3y

上一页12345末页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.