- <%
- String str = "<a href='#'>这是链接</a>Lkfd<font color=/"red/"><h1>字体是红色</hr></font>";
- request.setAttribute("str",str);
- %>
- <bean:write name="str" filter="true"/><br>
- <bean:write name="str" filter="false"/>
bean:wreite 标签显示 html 代码在页面上
本文介绍了一段JSP代码示例,展示了如何使用bean:write标签来输出带有HTML标签的字符串,并通过设置filter属性为true或false来控制是否进行HTML实体转换。

被折叠的 条评论
为什么被折叠?



