梦幻之旅

DEBUG - 天道酬勤

   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  671 随笔 :: 6 文章 :: 256 评论 :: 0 Trackbacks
<%@ page language="java" pageEncoding="GB2312"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    
<head>
        
<title>Huy Vanpull's exercise of struts 2.0 tags</title>

        
<meta http-equiv="pragma" content="no-cache">
        
<meta http-equiv="cache-control" content="no-cache">
        
<style type="text/css">
.inputStyle 
{
    width
: 120px;
    height
: 20px;
    color
: red;
}

</style>
    
</head>
    
<body>
        
<span>表单标签练习:<br /> </span>
        
<s:form id="sform" name="sform" action="userAdd" namespace="/example"
            method
="post" theme="simple" onsubmit="return test()">
            
<s:hidden id="userId" name="user.userId" />
            UserName:
<s:textfield id="userName" name="user.userName"
                value
="Huyvanpull" maxlength="16" cssClass="inputStyle" />
            
<br />
            Password:
<s:password id="password" name="user.password"
                maxlength
="16" cssClass="inputStyle" />
            
<br />
            
&nbsp;&nbsp;Gender:<s:radio id="gender" name="user.gender"
                list
="#{'male':'男','female':'女'}" value="'male'"/>
            
<br />    
            
&nbsp;&nbsp;Educat:<s:select id="education" name="user.education"
                headerKey
="-1" headerValue="请选择学历"
                list
="#{'0':'小学', '1':'初中', '2':'高中','3':'专科','4':'本科'}"
                value
="4" required="true" cssClass="inputStyle" />
            
<br />
            Interest:
<s:checkbox id="interest1" name="user.interest1" value="true" fieldValue="1" /> 
            
<br />
            
&nbsp;&nbsp;Remark:<s:textarea id="remark" name="user.remark" value="rea" onfocus="this.select();" cssClass="inputStyle" />
            
<br />
            
<s:token />
        
</s:form>
    
</body>
</html>
posted on 2008-10-12 13:17 HUIKK 阅读(1618) 评论(0)  编辑  收藏 所属分类: Struts

只有注册用户登录后才能发表评论。


网站导航: