JSP
一只不秃头的小菜鸟
路漫漫其修远兮
展开
-
使用application记录页面访问次数--适合新手!
<%//使用application是先网页的网站访问的次数 //1 要有一个变量计算页面的访问次数 //先把统计次数的变量拿出来 Object count = application.getAttribute("count"); if(count == null ){ //第一次访问 需要创建一个存储访问次数的变量 并将其放进application中 //第一次访问...原创 2019-07-04 21:51:45 · 1099 阅读 · 0 评论 -
使用Cookie做一个简单应用保存用户名---适合新手!
**后台页面**<%@ page language=“java” contentType=“text/html; charset=UTF-8”pageEncoding=“UTF-8”%>后台页面 <% String username = request.getParameter("username"); //新建一个cookie 也是键值对的模式 ...原创 2019-07-05 10:05:44 · 302 阅读 · 0 评论