<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage=""%> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>声明示例</title> </head> <%! //声明一个变量 public int count = 0; //声明一个方法 public String info(){ return "hello"; } %> <body> <% out.println(count++); %> <br /> <% out.println(info()); %> </body> </html>
吴裕雄--天生自然JAVA开发JSP-Servlet学习笔记:JSP声明
猜你喜欢
转载自www.cnblogs.com/tszr/p/12663791.html
今日推荐
周排行