• HTML基础-表单标签,button按钮,select下拉菜单


    HTML基础-表单标签

    目标和学习路径

    1.表单标签

    1.1 input系列标签的基本介绍

    1.2 input系列标签-文本框

    (拓展)value属性和name属性作用介

    1.3 input系列标签-密码框

    1.4 input系列标签-单选框

    1.5 input系列标签-复选框

    1.6 input系列标签-文件选择

    2.button按钮标签

    1.7 input系列标签-按钮

    测试代码:

    1. html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <title>Documenttitle>
    8. head>
    9. <body>
    10. 文本框: <input type="text" placeholder="提示用户该输入啥?">
    11. <br>
    12. <br>
    13. 密码框: <input type="password" placeholder="请输入密码">
    14. <br>
    15. <br>
    16. 单选框: <input type="radio">
    17. <br>
    18. <br>
    19. 单选框: <input type="radio" name="key"><input type="radio" name="key"><input type="radio" name="key">
    20. <br>
    21. <br>
    22. 单选框: <input type="radio" checked>
    23. <br>
    24. <br>
    25. 多选框: <input type="checkbox"><input type="checkbox"><input type="checkbox">
    26. <br>
    27. <br>
    28. 上传文件: <input type="file">
    29. 上传文件: <input type="file" multiple>
    30. <button>我是按钮button>
    31. <button type="submit">提交按钮button>
    32. <button type="reset">重置按钮button>
    33. <button type="button">普通按钮, 没有任何功能button>
    34. body>
    35. html>
    测试结果:

    关于input的标签总结:

    3. select下拉菜单

    3.1 select下拉菜单标签

    4.1 textarea文本域标签

    测试代码:

    1. html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <title>Documenttitle>
    8. head>
    9. <body>
    10. <h2>select下拉菜单h2>
    11. <select name="所有城市" id="allcity">
    12. <option>保山option>
    13. <option>合肥option>
    14. <option>鹤庆option>
    15. <option selected>安庆option>
    16. select>
    17. <br>
    18. 详细描述:<textarea cols="6" rows="3">textarea>
    19. <br>
    20. 性别:
    21. <input type="radio" name="sex" id="nan">
    22. <label for="nan">label>
    23. <label><input type="radio" name="sex">label>
    24. body>
    25. html>
    测试结果:

  • 相关阅读:
    4.3 - 队列与栈
    FL Studio 2023中文安装设置指南!四招教你玩转FL Studio21!
    Pygame中Sprite类的使用1
    STM32CubeMX教程31 USB_DEVICE - HID外设_模拟键盘或鼠标
    Vue开发项目入门——Vue脚手架
    【Python3】初识Python及其基础知识
    The Merge尚未被市场定价 熊市让加密回归初衷
    Mac环境下,简单反编译APK
    [ubuntu]OpenFOAM国内源码满速下载地址
    [附源码]Python计算机毕业设计Django教育企业网站
  • 原文地址:https://blog.csdn.net/weixin_48370579/article/details/128072464