码迷,mamicode.com
首页 > Web开发 > 详细

HTML Form

时间:2020-02-07 22:22:05      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:input   orm   push   mission   get   sele   cli   select   group   

HTML Form

<form action="#" method="GET">
  <!-- text field -->
  <label for="username">username</label>
  <input type="text" name="username" id="username">

  <label for="password">password</label>
  <input type="password" name="password" id="password">

  <br>
  <!-- radio button -->
  <!-- Radio buttons with the same "name" attribute are members of a group -->
  <input type="radio" name="gender" value="male">man
  <input type="radio" name="gender" value="female" checked>woman
  <br>

  <!-- checkbox -->
  <input type="checkbox" name="pets" value="dog" checked>Dog
  <input type="checkbox" name="pets" value="cat">Cat
  <input type="checkbox" name="pets" value="bird">Bird
  <input type="checkbox" name="pets" value="fish">Fish

  <!-- submission button -->
  <input type="submit" >

  <!-- reset button -->
  <input type="reset" >

  <!-- push button -->
  <input type="button" name="key" value="label" onclick="">

  <!-- hidden field -->
  <input type="hidden" name="action" value="changes">

</form>

<!-- must specify method and enctype attributes like these if upload file. -->
<form action="#" method="POST" enctype="multipart/form-data">
  <!-- file-selection -->
  <input type="file" accept="image/*" name="upload_file">

  <button type="submit">upoload</button>
  <button type="reset">reset</button>
  <button type="button" name="key" value="not_label" onclick="">just a push button</button>
  
</form>

HTML Form

标签:input   orm   push   mission   get   sele   cli   select   group   

原文地址:https://www.cnblogs.com/bit-happens/p/12274709.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!