zoukankan      html  css  js  c++  java
  • html基础

    ## HTML
    - 每个标签都有自己独特的能力 <input> 输入框 <h2>
    - 标签中通过属性也可以获取某种能力

    - input 输入框
    - h2 标题
    - div 分块,换行
    - a 链接
    - img 图片
    - checkbox radio 多选、单选
    - id
    - name
    - form 表单格式
    - table(表格)
    - ul
    - iframe 子网页


    如何传参给后端
    <form action="http://httpbin.org/post" method="post">
    
        <div>
            性别:<input type="radio" name="gender" value="man"><input type="radio" name="gender" value="girl"><input type="radio" name="gender" value="unknown">未知
    <!--        这是另一个选择器-->
            <input type="radio" name="aaa">男女
        </div>
    </form>

    第一行发起post请求,div里相当于{"gender":"man", "gender":"girl", "gender":"unknown",},从name属性中获取键名,value中获取值。

    示例html:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>py44</title>
    </head>
    <body>
    
    <!--    标题-->
        <h2>登录</h2>
    
        <form action="http://httpbin.org/post" method="post">
    <!--    输入用户名-->
        <div>用户名:<input name="username"></div>
    <!--输入密码-->
        <div>密码:<input type="password" name="pass"></div>
    <!--    单选框-->
        <div>
            性别:<input type="radio" name="gender" value="man"><input type="radio" name="gender" value="girl"><input type="radio" name="gender" value="unknown">未知
    <!--        这是另一个选择器-->
            <input type="radio" name="aaa">男女
        </div>
    
        <div>
            喜欢的电影:<input type="checkbox" name="movie" value="zhanlang">战狼
            <input type="checkbox" name="movie" value="honghai">红海行动
            <input type="checkbox" name="movie" value="shuofu">说服
        </div>
            <div><input type="file" name="avatar"></div>
    
    
        <!--提交-->
        <div><input type="submit"></div>
        </form>
    
    <!--    <a href="http://www.baidu.com">-->
    <!--        <img src="resume.png" width="400px" height="300px">-->
    <!--    </a>-->
    
        <iframe src="http://www.testingpai.com" width="800px" height="600px"></iframe>
    
    
    </body>
    </html>
  • 相关阅读:
    【新特性速递】卡片式表格,Yeah~~~
    6个最佳DevOps播客
    在裸金属服务器Bare Metal上Kubernetes
    保护Java应用程序不被窃取数据和源代码2
    家政服务行业动态
    15个免费数据集数据科学项目
    性能测试工具
    利用Apache Pulsar的实时边缘计算
    软件开发的八个误解
    如何防止范围蔓延
  • 原文地址:https://www.cnblogs.com/wsfsd/p/15585335.html
Copyright © 2011-2022 走看看