<c:set var="varname" value="表达式" [scope="request|page|session|application"] />或
<c:set var="varname" [scope="request|page|session|application"]>表达式</c:set>其中:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <title>编程帮(www.lmcjl.com)</title> </head> <body> <body> <h1><c:set> 实例</h1> <c:set var="name" value="编程帮" scope="session" /> <c:out value="${name }" /> <br /> <br /> <c:set var="name" scope="session">编程帮</c:set> <c:out value="${name }" /> </body> </html>
<c:set> 实例
编程帮
编程帮
本文链接:http://task.lmcjl.com/news/13943.html