<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
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 'add.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 type="text/javascript" src="<%=basePath%>/../js/jquery-1.7.js"></script>
<script type="text/javascript">
$(function (){
$("option[value="+"${user.num}"+"]").attr("selected",true);
});
</script>
</head>
<body>
<form action="updUser.action" method="post">
id:<input type="hidden" name="id" value="${user.id}"><br>
name:<input type="text" name="name" value="${user.name}"><br>
sex:<input type="text" name="sex" value="${user.sex}"><br>
age:<input type="text" name="age" value="${user.age}"><br>
num:<select name="num" >
<c:forEach var="n" items="${numList }">
<option value="${n.name }">${n.name }</option>
</c:forEach>
</select><br>
<input type="submit" value="提交">
</form>
</body>
</html>
Learn to control your temper
学会控制个人情绪
A quick temper will make a fool of you soon enough – Bruce Lee
急躁的脾性早晚会令你更加出丑
——李小龙
JSP页面编辑用户信息

被折叠的 条评论
为什么被折叠?



