<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>first.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
<form action="index.jsp">
<input type="text" name="username" />
<input type="checkbox" name="xingqu" value="篮球" />
篮球
<input type="checkbox" name="xingqu" value="乒乓" />
乒乓
<input type="checkbox" name="xingqu" value="滑冰" />
滑冰
<input type="submit" value="提交" />
</form>
</body>
<html>
<head>
<title>first.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
<form action="index.jsp">
<input type="text" name="username" />
<input type="checkbox" name="xingqu" value="篮球" />
篮球
<input type="checkbox" name="xingqu" value="乒乓" />
乒乓
<input type="checkbox" name="xingqu" value="滑冰" />
滑冰
<input type="submit" value="提交" />
</form>
</body>
</html>
进行输出:
${param.username}
${paramValues.xingqu[1]}
本文档提供了一个简单的HTML页面示例,该页面包含一个表单用于收集用户名及兴趣选项,并展示了如何通过JSP输出提交的参数值。此示例有助于理解HTML表单的基本用法及其与服务器端交互的过程。
376

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



