(一):jsp简单的程序体现交互性 (JSP学习第一天)
编写表单:input.html
<html> <head> <title>input页面</title> </head> <body> <form action="input.jsp" method="post"> 姓名:<input type="text" name="info"> <input type="submit" value="提交"> </form> </body> </html>
接收输入表单的参数并显示:input.jsp
<html>
<head>
<title>测试input</title>
</head>
<body>
<%
String str=request.getParameter("info");
out.println("<h1>"+str+"</h1>");
%>
</body>
</html>
浙公网安备 33010602011771号