Home JSP页面获取Controller设置的参数
Post
Cancel

JSP页面获取Controller设置的参数

在controller中设置参数

1
request.setAttribute("param", "123");

在JSP页面获取该参数

1
var param = '<%=request.getAttribute("param")%>';
This post is licensed under CC BY 4.0 by the author.