前端页面接收request.setAttribute("变量名", 变量值)传的值
2017-07-10 16:15
471 查看
1.js中使用
<script>
var a='${变量名}';//注意变量名一定要和setAttribute中设置的变量名相同
</script>
2.html中使用
${变量名}
示例:
<script>
var a='${变量名}';//注意变量名一定要和setAttribute中设置的变量名相同
</script>
2.html中使用
${变量名}
示例:
<table id="treedg" data-options="toolbar:'#tb'" > <c:if test="${fieldMaxLevel!=0}"> <c:if test="${frozenFields!=null}"> <!-- 冻结列一定要在列表最左侧,并且不可跳跃式冻结,单层次列,不具有合并属性 --> <thead data-options="frozen:true"> <tr> <c:forEach var ="item" items='${frozenFields}'> <c:choose> <c:when test="${item.isCollapse>0}"> <th data-options="field:'${item.field}',width:${item.width},halign:'${item.halign}',align:'${item.align}',formatter:${item.formatterFun},styler:${item.stylerFun}" >${item.title} <i id="${item.field}" class="fa-minus-square-o" style="cursor:pointer" onclick="collapse(this,'${item.collapseFields}')"></i></th> </c:when> <c:otherwise> <th data-options="field:'${item.field}',width:${item.width},halign:'${item.halign}',align:'${item.align}',formatter:${item.formatterFun},styler:${item.stylerFun}" >${item.title}</th> </c:otherwise> </c:choose> </c:forEach> </tr> </thead> </c:if> <thead> <c:forEach begin="1" end="${fieldMaxLevel}" var="i"> <tr> <c:forEach var ="item" items='${commonFields}'> <c:if test="${item.fieldLevel==i}"> <c:choose> <c:when test="${item.isCollapse>0}"> <th data-options="field:'${item.field}',width:${item.width},halign:'${item.halign}',align:'${item.align}',formatter:${item.formatterFun},styler:${item.stylerFun}" rowspan="${item.rowspan}" colspan="${item.colspan}">${item.title} <i id="${item.field}" class="fa-minus-square-o" style="cursor:pointer" onclick="collapse(this,'${item.collapseFields}')"></i></th> </c:when> <c:otherwise> <th data-options="field:'${item.field}',width:${item.width},halign:'${item.halign}',align:'${item.align}',formatter:${item.formatterFun},styler:${item.stylerFun}" rowspan="${item.rowspan}" colspan="${item.colspan}">${item.title}</th> </c:otherwise> </c:choose> </c:if> </c:forEach> </tr> </c:forEach> </thead> </c:if> </table>
相关文章推荐
- request.getSession().setAttribute("",..)和request.setAttribute("",...)的区别
- 踩坑(1):IDEA中解决JSP页面cannot resolve method setAttribute("")
- Java_Web_request.setAttribute("result",username);
- struts2接收action中定义好的集合,不需要request.setattribute
- request.getSession().setAttribute("",..)和request.setAttribute("",...)的差别
- jstl获取值需要 request.setAttribute("list", list);
- request.setAttribute("result",username);是什么意思?
- request.setAttribute("list",list);出现空指针
- <c:set var="root" value="${pageContext.request.contextPath}"></c:set>According to TLD or attribute d
- request.getAttribute( "result");和request.setAttribute("result",username);
- 在jsp页面用request.setAttribute()在action用request.getAttribute()接收得到为null的问题的解决方法
- jsp中pageEncoding、charset=UTF -8"、(request/response).setCharacterEncoding("UTF-8")详
- PHP获取当前url路径的函数及服务器变量:$_SERVER["QUERY_STRING"],$_SERVER["REQUEST_URI"],$_SERVER["SCRIPT_NAME"],$_SERVER["PHP_SELF"]
- JSP中pageEncoding、charset=UTF -8"、(request/response).setCharacterEncoding("UTF-8")详
- request.getSession.setAttribute().....
- 采用struts2防止重复提交后无法采用request.getParameter("xxx")得到页面隐藏框值解决方案
- request.getParameter(),request.getAttribute(),request.setAttribute();
- [转载]jsp中pageEncoding、charset=utf8"、(request/response).setCharacterEncoding("utf8")
- request.setAttribute
- 在jsp中使用request.setAttribute()为何在跳转到Action后无法提出