html制作一个简单的表单

发布于:2025-07-01 ⋅ 阅读:(14) ⋅ 点赞:(0)

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>表单输入练习</title>
  <style>

  </style>
</head>

<body style="background-color: pink;">
  <div>
    <h2>申请表</h2>
    <hr>
    <form action="#" method="post">
      <div class="a1" style="margin-top: 10px;">
        <lable for="name">姓名</lable>
        <input type="text" id="name" name="name">
      </div>
      <div class="a2" style="margin-top: 10px;">
        <lable for="job">感兴趣的职位:</lable>
        <input type="radio" id="job1" name="job"> <label for="job1">web设计师</label>
        <input type="radio" id="job2" name="job"> <label for="job2">web开发着</label>
        <input type="radio" id="job3" name="job"> <label for="job3">web管理者</label>
      </div>
      <div class="a3" style="margin-top: 10px;">
        <lable for="ruquire">其他需求:</lable>
        <textarea name="require" id="ruquire" cols="30" rows="10"></textarea>
      </div>
      <div class="a4" style="margin-top: 10px;">
        <input type="checkbox" id="confirm">
        <label for="confirm">阅读确认信息</label>
      </div>
      <div class="a5" style="margin-top: 10px;">
        <label for="xuanze">经验</label>
        <select name="xuanze" id="xuanze">
          <option value="0year">无经验</option>
          <option value="1year">1年</option>
          <option value="2year">2年</option>
          <option value="3year">3年</option>
        </select>
      </div>
      <div class="a6" style="margin-top: 10px;">
        <input type="submit" value="确定">
        <input type="reset" value="重置">
      </div>
    </form>
  </div>
</body>

</html>

其中,input 有很多 text,radio(单选),checkbox(多选)

其中的绑定关系


网站公告

今日签到

点亮在社区的每一天
去签到