Chinaunix首页 | 论坛 | 博客
  • 博客访问: 335263
  • 博文数量: 96
  • 博客积分: 2041
  • 博客等级: 大尉
  • 技术积分: 1080
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-20 14:08
文章分类

全部博文(96)

文章存档

2015年(2)

2013年(1)

2012年(93)

分类: 系统运维

2012-01-20 20:41:17

thmem默认时:

 

-----------------------------------------------------------------

 

theme="simple"后

theme默认时候

<%@ page language="java" pageEncoding="gbk"%>

<%@taglib prefix = "s" uri = "/struts-tags" %>

<html> 

<body>

    <s:actionerror/>

    ----------------

    <s:fielderror cssStyle = "color:blue">s:fielderror>

   

   

    <s:form action = "register"  theme = "simple">

    <s:textfield name = "username" label = "username">s:textfield>

    <s:password name = "password" label = "password">s:password>

    <s:password name = "repassword" label = "repassword">s:password>

    <s:textfield name = "birthday" label = "birthday">s:textfield>

    <s:textfield name = "graduation" label = "graduation">s:textfield>

   

    <s:submit value = "submit">s:submit>

    s:form>

body>

html>

 

 

theme=”simple”之后

<%@ page language="java" pageEncoding="gbk"%>

<%@taglib prefix = "s" uri = "/struts-tags" %>

<html> 

<body>

    <s:actionerror/>

    ----------------

    <s:fielderror cssStyle = "color:blue">s:fielderror>

   

     

    <s:form action = "register"  theme = "simple">

    username:<s:textfield name = "username" label = "username">s:textfield><br>

    password:<s:password name = "password" label = "password">s:password><br>

    repassword:<s:password name = "repassword" label = "repassword">s:password><br>

    birthday:<s:textfield name = "birthday" label = "birthday">s:textfield><br>

    graduation:<s:textfield name = "graduation" label = "graduation">s:textfield><br>

   

    <s:submit value = "submit">s:submit>

   

    s:form>

   

   

body>

html>

 

 

另外说明:struts2默认提交方式是”post”,html默认是”get”

 

零碎知识: 

流程:jsp页面,以age为例,当提交age=4后,变到相应的xxxAction中找setAge(4)方法。

 

阅读(981) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~