zoukankan      html  css  js  c++  java
  • EL表达式的11隐含对象

    EL表达式在不同范围如何取值:

    <%
            pageContext.setAttribute("book", "红楼梦");
            request.setAttribute("book", "水浒传");
            session.setAttribute("book", "三国演义");
            application.setAttribute("book", "西游记");
        %>
        <!-- 当key值相同的时候,并且没有指明在什么范围内取值的话,会取最小范围内的值返回 -->
        ${book }
        <br/>
        <!-- 获取不同范围内的值 -->
        pageScope:${pageScope.book }
        <br />
        requestScope:${requestScope.book }
        <br />
        sessionScope:${sessionScope.book }
        <br />
        applicationScope:${applicationScope.book }
        <br />
        <hr/>
        <input type="text" value = "${pageScope.book }" />
        <input type="text" value = "${pageScope['book']}" />
        <input type = "text" value = "<%=request.getParameter("user_id")==null?"":request.getParameter("user_id") %>"  /><br/>
       param:相当于request.getParameter("user_id"); <input type= "text" value = "${param.user_id }" /><br/>
       paramValues(一key多值):相当于request.getParameterValues("user_id");<input type = "text" value= "${paramValues }" />
    
  • 相关阅读:
    async和await
    Promise
    初始flexbox
    制作一个slider动画
    初探React编程逻辑(结合业务需求)
    原型(prototype)和继承(inherit)
    什么是词法环境(lexical scope)
    typeScript是什么
    typeScript基础类型
    原型,原型链,call/apply
  • 原文地址:https://www.cnblogs.com/blogofcookie/p/8343647.html
Copyright © 2011-2022 走看看