展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

表单form标签

使⽤场景需要提交⼀些信息到服务端的时候(前后端联调过程中)
核⼼元素input (核⼼元素)
label (提⾼交互体验的)
select(下拉框)
textarea(⽂本域)
button(按钮)
form(表单元素,提交每个表单项内容)
  • 代码案例
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <form action="">
    <input type="text">
    <!-- <label>
      <input type="checkbox">同意
    </label> -->
    <label for="isagree">同意</label>
    <input type="checkbox" id="isagree">
    <select>
      <option value="1">男</option>
      <option value="2">女</option>
    </select>
    <button type="submit">注册</button>
  </form>
</body>
</html>
posted @ 2022-08-29 23:10  DogLeftover  阅读(14)  评论(0)    收藏  举报