当前页面显示提交的信息.txt
来自「JSP中一些常用到的菜单或处理方式。小计较」· 文本 代码 · 共 44 行
TXT
44 行
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'test.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<FORM name=mainForm action="" method="post" >
用户名:<INPUT size=30 name=username>
<input type="submit" name="Submit" value="提交">
</Form>
<%
String req_submit=request.getParameter("Submit");
if(req_submit!=null){
//Form is submit
String req_username = new String(request.getParameter("username").getBytes("ISO8859_1"),"GBK"); //接收中文
out.print("<Br> 提交的用户名是:"+req_username );
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?