Form表单

1浏览器将表单中的数据传送给服务器进行处理。Method属性有两种方法:postget 

例:<form method="get" action="http://www.baidu.com">

2、用户名<input type="text" name="uname"/>

     <input type="password" name="pwd"/>

  

 <input type="reset" value="重 置" />

  <input type="submit" value="提 交" />

 

3、出生年月下拉框:

 

  <select name="year" multiple="multiple"(可多选)size="数字"(一次出现几行)>

 

      <option value="2000">2000</option>

 

      <option value="2001">2001</option>

 

      <option value="2002" selected="selected"(默认)>2002</option>

 

      <option value="2003">2003</option>

 

  </select>

4、多选框:

  <input id="h1" type="checkbox" checked="checked"(默认) name="hobby" value="0" />

  <label for="h1">足球</label>

  <input id="h2" type="checkbox" name="hobby" value="0" />

  <label for="h1">羽毛球</label>

 

5、

  <input id="sex1" type="radio" name="sex" value="1" />       

       <label for="sex1">男</label><br  />

  <input id="sex0" type="radio" name="sex" value="0" />       

      <label for="sex0">女</label><br  />

 

(用表格嵌套)

 

posted @ 2017-04-10 21:32  程序小白灬  阅读(226)  评论(0编辑  收藏  举报