index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.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>
<%
request.setCharacterEncoding("gbk");
String s1 = request.getParameter("select1");
String s2 = request.getParameter("select2");
String s3 = request.getParameter("select3");
out.println(s1+","+s2+","+s3);
%>
</body>
</html>
test.jsp
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<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 action="./index.jsp" method="post">
<table
align="center"width="392" height="230" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FF9999"><div align="center"><span class="STYLE2">送货地址确认</span></div></td>
</tr>
<tr>
<td bgcolor="#FF9999" class="STYLE2"><div align="center">省份:
<select name="select1" id="select">
<option>北京市</option>
<option>山东省</option>
<option>河北省</option>
</select>
</div></td>
</tr>
<tr>
<td bgcolor="#FF9999" class="STYLE2"><div align="center">城市:
<select name="select2" id="select2"size="1">
<option>北京市</option>
<option>济南市</option>
<option>石家庄市</option>
</select>
</div></td>
</tr>
<tr>
<td bgcolor="#FF9999" class="STYLE2"><div align="center">区:
<select name="select3" id="select3"size="1">
<option>西城区</option>
<option>高新区</option>
<option>历城区</option>
</select>
</div></td>
</tr>
</table>
<div align="center"><input type="submit" value="确认"/></div>
</form>
</body>
</html>
效果展示:
test.jsp
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
index.jsp
界面我就没做了,我就按群主的意思显示在主页上,美观上不用纠结。。。