java代码031

code031.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>session保存</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8"); 
String name = request.getParameter("name");
session.setAttribute("name", name);
%>
<form id="form1" name="form1" method="post" action="code032.jsp">
<table width="60%" border="0">
    <tr>
        <td>你的名字:</td>
        <td><%= name %></td>
    </tr>
    <tr>
        <td>你喜欢去的地方:</td>
        <td>
        <input type="text" id="address" name="address">
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <input type="submit" id="submit" name="submit" value="提交内容">
        </td>
    </tr>
</table>
</form>
</body>
</html>

评论

h
hw_7864

⭐️ Admin快速开发: https://show.cool-admin.com/

赞 0
h
hw_7864

⭐️ 官方文档: https://cool-js.com

赞 0
h
hw_7864

⭐️ chatgpt在线体验: https://cool-js.com/ai/chat-vip/index.html?r=helloworld

赞 0