天天看點

C:remove标簽

<c:remove>标簽中 var 是要删除屬性的名稱,必須指定此名稱。scope是删除屬性儲存的範圍,預設儲存在page中

JSP代碼如下:

<%@ page contentType="text/html" pageEncoding="GBK"%>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>

<html>

<head><title></title></head>

<body>

<c:set var="info" value="aaaaa" scope="request"/>

<c:remove var="info" scope="request"/>

<h3>屬性内容:${info}</h3>

</body>

</html>

代碼中删除了屬性名稱為info的,是以該屬性内容不能顯示:

C:remove标簽
C:remove标簽

繼續閱讀