<%@ page language="java" pageEncoding="GB2312"%><%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<title>login.jsp</title>
</head>
<body>
<html:form action="/login" method="post">
<table border="0">
<tr>
<td> 用户名:</td>
<td><html:text property="username" /></td>
</tr>
<tr>
<td>密 码:</td>
<td><html:password property="password" /></td>
</tr>
<tr>
<td colspan="2" align="center"><html:submit value="登录"/></td>
</tr>
</table>
</html:form>
</body>
</html:html>1.<html:html locale="true">什么意思?不是用<html>就可以了吗?
2.<html:form action ="login" method="post">好像多了个html,什么意思呢?
3. colspan="2"的作用?
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<title>login.jsp</title>
</head>
<body>
<html:form action="/login" method="post">
<table border="0">
<tr>
<td> 用户名:</td>
<td><html:text property="username" /></td>
</tr>
<tr>
<td>密 码:</td>
<td><html:password property="password" /></td>
</tr>
<tr>
<td colspan="2" align="center"><html:submit value="登录"/></td>
</tr>
</table>
</html:form>
</body>
</html:html>1.<html:html locale="true">什么意思?不是用<html>就可以了吗?
2.<html:form action ="login" method="post">好像多了个html,什么意思呢?
3. colspan="2"的作用?
html:form这个是一个标签啊,和form功能差不多,只是在不同的版本里的啊~
2. <html:form action ="login" method="post">好像多了个html,什么意思呢?
這兩個都是struts框架的tag,是經過處理的html增強tag3. colspan="2"的作用?
這個是代表該單元格合併兩列
html:form struts中定义form的标签
colspan="2" 合并两列单元格。
This is a declarative way of populating locale in the session. When locale=true is
specified, the tag logic will retrieve the Locale using the HttpServletRequest.getLocale() method.colspan="2" 就是合并两列单元格。
<html:form action="/login" method="post"> //表单。与<form>类似
<td colspan="2" //本列占两行
html开头的是struts框架里面的自定义标签啊。和 html标签差不多的功能。只是强大了一些。