当柳上原的风吹向天际的时候...

真正的快乐来源于创造

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  368 Posts :: 1 Stories :: 201 Comments :: 0 Trackbacks
效果:


代码:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
 
<head>
  
<title>表单示例</title>
   
<style type="text/css">
        <!--
        #formDiv 
{
          width
:600px;
          padding
:20px;
          text-align
:left;
        
}
        #formDiv fieldset 
{
          margin
: 1em 0;
          padding
:10px;
          border
: 1px solid #ccc;
        
}
        #formDiv legend 
{
          margin
: 1em 0;
          padding
: 0 .5em;
          color
: #036;
          background
: transparent;
          font-size
: 1.3em;
          font-weight
: bold;
        
}
        #formDiv label 
{
          float
: left;
          width
: 100px;
          padding
: 0 1em;
          text-align
: right;
          color
: #003366;
        
}
        #formDiv p 
{
          float
: left;
          padding
: 0 1em;
          text-align
: left;
          color
: #003366;
        
}
        #formDiv fieldset div
{
          clear
:both;
          margin-top
: 5px;
        
}
        #formDiv fieldset div.inputText input, fieldset div.inputText textarea 
{          
          border-top
: 1px solid #555;
          border-left
: 1px solid #555;
          border-bottom
: 1px solid #ccc;
          border-right
: 1px solid #ccc;
          padding
: 1px;
          color
: #333;
        
}
        #formDiv div.submitDiv 
{
          margin-top
: 10px;
        
}
        #formDiv div.submitDiv input 
{
          border
: 1px solid #333;
          padding
: 2px 1em;
          background
: #555;
          color
: #fff;
        
}
        -->
    
</style>    
 
</head>

 
<body>    
    
<div id="formDiv">
        
<form action="#" method="post">
            
<fieldset>
            
<legend>表单示例</legend>
            
<p>请填写以下表单.</p>
            
<div class="inputText">
                
<label for="textBox">文本框:</label>
                
<input  name="textBox" type="text"/>
                
<span/>提示文字<span>
            
</div>
            
<div class="inputText">
                
<label for="textArea1">文本域:</label>
                
<textarea name="textArea1" cols="40" rows="10"/></textarea>
                
<span/><span>
            
</div>
            
<div>
                
<label for="selectBtn">选择框:</label>
                
<select id="selectBtn" name="selectBtn">
                    
<option value="1">选项一</option>
                    
<option value="2">选项二</option>
                    
<option value="3" selected="selected">选项三</option>
                    
<option value="4">选项四</option>
                
</select>
                
<span/><span>
            
</div>
            
<div>
                
<label for="checkBox1">复选框:</label>
                选项一:
<input type="checkbox" name="checkBox1" id="checkBox1" value="1" />
                选项二:
<input type="checkbox" name="checkBox1" id="checkBox1" value="2"/>
                选项三:
<input type="checkbox" name="checkBox1" id="checkBox1" value="3" checked/>
                
<span/><span>
            
</div>
            
<div>
                
<label for="radioBtn">单选框:</label>
                
<input id="radioBtn" name="radioBtn" type="radio" value="0" />选项1
                
<input id="radioBtn" name="radioBtn" type="radio" value="1" />选项2
                
<input id="radioBtn" name="radioBtn" type="radio" value="2" checked/>选项3
                
<input id="radioBtn" name="radioBtn" type="radio" value="3" />选项4
                
<span/><span>
            
</div>
            
<div class="submitDiv">
                
<label for="submitBtn">&nbsp;</label>
                
<input name="submitBtn" type="submit" value="提交" />
            
</div>
            
</fieldset>
        
</form>
    
</div>
 
</body>
</html>

代码下载:
http://www.blogjava.net/Files/heyang/formSample20090827115416.rar

posted on 2009-08-27 11:55 何杨 阅读(225) 评论(0)  编辑  收藏