Blogger Information
Blog 26
fans 0
comment 0
visits 12193
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
1018作业:表单
高空中的云
Original
396 people have browsed it

表单作业

用到了input select textarea progress 这四个标签
其中,input用到了若干不同的type,如:type=text type=password type=radio type=file type=checkbox type=radio type=date

完成表单截图

效果图

完整表单代码

  1. <form action="updateCompany.php" id="updatecompany" target="_self" method="POST" enctype="multipart/form-data">
  2. <fieldset>
  3. <legend>企业基本信息</legend>
  4. <div class="companyname">
  5. <label for="companyname">企业名称<span>*</span>:</label>
  6. <input type="text" id="companyname" name="companyname" placeholder="企业全称" required>
  7. </div>
  8. <!-- 正常省市县(区)是三级联动,需要js和预设地区数据,这里仅展示 -->
  9. <div class="address">
  10. <label for="address">通讯地址<span>*</span>:</label>
  11. <select name="address_province" id="address_province">
  12. <option value="" disabled selected>--请选择省份--</option>
  13. <option value="山东省">山东省</option>
  14. <option value="河北省">河北省</option>
  15. <option value="江苏省">江苏省</option>
  16. </select>
  17. <select name="address_city" id="address_city">
  18. <option value="" disabled selected>--请选择市--</option>
  19. <option value="济南市">济南市</option>
  20. <option value="石家庄市">石家庄市</option>
  21. <option value="南京市">南京市</option>
  22. </select>
  23. <select name="address_district" id="address_district">
  24. <option value="" disabled selected>--请选择区--</option>
  25. <option value="历下区">历下区</option>
  26. <option value="长安区">长安区</option>
  27. <option value="鼓楼区">鼓楼区</option>
  28. </select>
  29. <input type="text" id="address" name="address" placeholder="详细街道地址" required>
  30. <output style="color: lightgray;">因省市县(区)三级联动需用到数据和js,这里仅做html结构演示</output>
  31. </div>
  32. <!-- -->
  33. <div class="picture">
  34. <label for="picture">营业执照<span>*</span>:</label>
  35. <input type="file" id="picture" name="picture" placeholder="请选择营业执照" required>
  36. </div>
  37. <div class="valid">
  38. <label for="valid">有效期至(营业执照)<span>*</span>:</label>
  39. <input type="date" name="valid" value="2022-10-18" id="valid" min="2022-10-18" max="2099-01-01" />
  40. <output>or</output>
  41. <input type="checkbox" name="valid_long" id="valid_long" ><label for="valid_long">长期</label>
  42. </div>
  43. <div>
  44. <label for="description">企业简介:</label>
  45. <!-- textarea: 没有value属性,它的值位于textarea标签之间 -->
  46. <textarea name="description" id="description" cols="30" rows="5">企业的简单文字介绍</textarea>
  47. </div>
  48. </fieldset>
  49. <fieldset>
  50. <legend>企业账户信息</legend>
  51. <div class="account">
  52. <label for="account">登录账号<span>*</span>:</label>
  53. <input type="text" id="account" name="account" placeholder="登录账号" required>
  54. </div>
  55. <div class="pwd">
  56. <label for="pwd">登录密码<span>*</span>:</label>
  57. <input type="password" id="pwd" name="pwd" placeholder="密码" minlength="6" required>
  58. </div>
  59. <div class="status">
  60. <label for="status">账户状态<span>*</span>:</label>
  61. <input type="radio" name="status" value="open" id="open"><label for="open">开启</label>
  62. <input type="radio" name="status" value="closed" id="closed"><label for="closed">关闭</label>
  63. <input type="radio" name="status" value="check" id="check" checked><label for="check">审核中</label>
  64. </div>
  65. <div class="authority">
  66. <label>账户权限:</label>
  67. <input type="checkbox" name="authority[]" value="edit" id="edit"><label for="edit">修改企业基本信息</label>
  68. <input type="checkbox" name="authority[]" value="news" id="news"><label for="news">发布更新资讯</label>
  69. <input type="checkbox" name="authority[]" value="employee" id="employee"><label for="employee">审核员工信息</label>
  70. </div>
  71. </fieldset>
  72. <div class="progress">
  73. <label for="">信息填写完成度</label>
  74. <progress name="progress" max="100" value="35"></progress>
  75. <output>35%</output>
  76. </div>
  77. <button type="button">提交</button>
  78. </form>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post