<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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 'test2.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">
-->
<script src="js/jquery-2.1.1.min.js" type="text/javascript">
</script>
<style>
#select{
width:100px;
height:30px;
background-color:#aff4fc;
color:#ff8000;
border-radius:5px;
}
select option{
</style>
</head>
<body>
<select name="請選擇" value="" id="select">
<option>請選擇--</option>
<option value="北京">北京</option>
<option name="name">上海</option>
<option name="name">天津</option>
<option name="name">武漢</option>
<option name="name">陝西</option>
<option name="name">山東</option>
<option name="name">河南</option>
<option name="name">河北</option>
</select>
</body>
<script language="JavaScript">
</script>
本文轉自 matengbing 51CTO部落格,原文連結:http://blog.51cto.com/matengbing/1865948