Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

tag

tag

JSP Standard Label LibraryJSP Standard Tag Library

The tag is used to remove a variable. You can specify the variable's scope; if not specified, it defaults to the scope in which the variable first appears.

This tag is not particularly useful, but it can be used to ensure that JSP completes its cleanup work.

Syntax format





property

The tag has the following attributes:

property Description Whether it is required Default value
var The name of the variable to remove Is None
scope The scope to which the variable belongs No All scopes

Example Demonstration



<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

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





c:remove 标签实例







salary 变量值:

删除 salary 变量后的值:

The running result is as follows:



salary 变量值: 4000



Value after deleting the salary variable:


JSP Standard Label LibraryJSP Standard Tag Library