标签:isp type body class sub method use orm logs
一、HTML页面和JSP页面的比较
二、HTML页面和JSP页面的交互
实例一,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>HTML页面向JSP页面传送数据</title> </head> <body> <form action=display.jsp method="get"> 姓名:<input type="text" name="userName"/> <input type="submit" value="传递给JSP页面"> </form> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>接收HTML页面传递的表单数据,并展示</title> </head> <body> <h1>接收HTML页面传递的表单数据,并展示html页面表单标签的值</h1> <% String name=request.getParameter("userName"); out.println("<h2>"+name+"</h2>"); %> </body> </html>
结果展示:
标签:isp type body class sub method use orm logs
原文地址:http://www.cnblogs.com/lxrm/p/6699446.html