s:textfield标签为什么不输出单行文本框?
代码如下<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%><%@taglibp...
代码如下
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'login.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>
<s:form action="loginn">
<table>
<caption>用户登录</caption>
<tr>
<td>登录名</td>
<td><s:textfield name="login.name"></s:textfield>
</td>
</tr>
<tr>
<td>密码</td>
<td><s:password name="login.password"></s:password>
</td>
</tr>
<tr>
<td><s:submit value="登录"/></td>
<td><s:reset value="重置"></s:reset>
</td>
</tr>
</table>
</s:form>
</body>
</html> 展开
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'login.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>
<s:form action="loginn">
<table>
<caption>用户登录</caption>
<tr>
<td>登录名</td>
<td><s:textfield name="login.name"></s:textfield>
</td>
</tr>
<tr>
<td>密码</td>
<td><s:password name="login.password"></s:password>
</td>
</tr>
<tr>
<td><s:submit value="登录"/></td>
<td><s:reset value="重置"></s:reset>
</td>
</tr>
</table>
</s:form>
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询