JSP Request. Getattributenames() method: returns the name collection of all attributes
•
Java
getAttributeNames()
Example
<%
request.setAttribute("name","zs"); //设置name属性
request.setAttribute("age","23"); //设置age属性
request.setAttribute("sex","男"); //设置sex属性
Enumeration e = request.getAttributeNames();
while(e.hasMoreElements()){
out.println(e.nextElement()+"<br>");
}
%>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
