首页 > 其他分享 >Day02 2.2、HTML基础之表单标签

Day02 2.2、HTML基础之表单标签

时间:2023-03-16 13:44:58浏览次数:44  
标签:单行 Day02 base64 文本框 表单 输入框 HTML 2.2 属性

二、表单标签

  • 是HTML中最终的标签之一,主要是提供了输入框或按钮等标签提供给用户进行交互输入数据。将来表单可以提交到指定服务端程序中进行数据处理。

1 form标签

属性 描述
action 设置当前表单的表单数据处理应用程序的url地址,默认值是当前url地址。
method 设置当前表单的HTTP提供方式,默认是get。 get,以查询字符串的格式,把表单数据附加在url地址栏上提交数据 post,以数据包格式,把表单数据附在HTTP网络请求体中提交数据
enctype 设置当前表单提交的数据格式,默认值是application/x-www-form-urlencoded。 application/x-www-form-urlencoded:以普通表达数据格式提交 multipart/form-data:以多种数据格式提交 text/plain:以纯文本数据格式提交

2 表单项标签(input/select/button/textarea )

类型 用法 描述
单行文本框 <input type="text" name="" value="" placeholder=""> name:设置输入框的值的变量名称,用于服务端接受数据。 value:设置输入框的默认值。 placeholder:设置输入框的提示内容。
密码框 <input type="password" name="" value="" placeholder=""> 只允许输入单行密码,属性描述同上
单行文本框(数值框) <input type="number" name="" value="" placeholder=""> 只允许输入数值内容,属性描述同上。 就版本浏览器中不支持时会被默认为text单行文本框。
单行文本框(日期输入框) <input type="date" name=""> 只允许输入日期格式内容,属性描述同上。 低版本浏览器中不支持时会被默认为text单行文本框。
单行文本框(时间输入框) <input type="time" name=""> 只允许输入时间格式内容,属性描述同上。 低版本浏览器中不支持时会被默认为text单行文本框。
单行文本框(日期时间输入框) <input type="datetime-local" name=""> 只允许输入日期时间格式内容,属性描述同上。 低版本浏览器中不支持时,会被默认为text单行文本框。
文件上传框 <input type="file" multiple name=""> multiple:布尔属性,允许一次性上传多个文件。 其他属性描述同上。
单选框 <input type="radio" name="" value=""> 用于提供一组多个选择让用户选一个选项的按钮组。 多个单选框必须name值相同才能为一组。 同一组单选框中的value值必填,而且值要唯一。
多选框 <input type="checkbox" name="fav" value="1"> 用于提供一组多个选择让用户选多个选项的按钮组。 多个多选框必须name值相同才能为一组。 同一组多选框中的value值必填,而且值要唯一。
下拉列表框 <select name=""> <option value="选项1值">选项1</option> <option value="选项2值">选项2</option> <option value="...">...</option> <option value="选项n值">选项n</option> </select> 属性描述同上。
多行文本框/文本域 <textarea name="" cols="" rows=""></textarea> cols:设置多行文本框默认列数[宽度] rows:设置多行文本框默认行数[高度] 注意:多行文本框标签中的任意内容都会被原样记录。
提交按钮 <input type="submit" value="提交"> value:表示当前按钮的提示文本。 用于提交表单数据到action属性对应的地址中。
普通按钮 <input type="button" value=""> 属性描述同上,主要用于配合js完成网页特效。
普通按钮 <button></button> 普通按钮,中间可以显示图片或文本。 主要用于配合js完成网页特效。
重置按钮 <input type="reset" value="重置"> 点击以后,会把当前表单中用户输入的所有内容进行还原到页面刚刷新状态。
隐藏域输入框 <input type="hidden" name="" value=""> 隐藏域输入框的作用是附带一些默认数据提交给服务端,但是不希望用户看到。

3 表单项的常用属性

属性名 描述
name 表示当前表单项的值的变量名,用于提供服务端获取本次提交的数据项。
value 表示当前表单项的值,如果值在代码中提前设置了,则为默认值
type 表示input框的类型
disabled 布尔属性,设置当前输入框是否被禁用
maxlength 设置当前输入框[textarea,input]中最大输入内容的长度。
multiple 设置允许文件上传框选择上传多个文件
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form action="http://httpbin.org/post" method="post" enctype="multipart/form-data">
        <input type="hidden" name="hide" value="1.0">
        <label>账号:
        <input type="text" name="username" value="root" disabled placeholder="请输入账号">
        </label><br>
        <label>密码:
        <input type="password" name="password" value="" maxlength="16" placeholder="请输入密码">
        </label><br>
        <label>年龄:
            <input type="number" name="age" value="" placeholder="请输入年龄">
        </label><br>
        <label>出生年月
            <input type="date" name="born">
        </label>
        <br>
        <label>时间:
            <input type="time" name="time">
        </label>
        <br>
        <label>本地日期时间:
            <input type="datetime-local" name="datetime">
        </label>
        <br>
        头像[单文件]:<input type="file" name="avatar"><br>
        头像[多文件]:<input type="file" multiple name="imgs[]">
        <br>
        性别:
            <label><input type="radio" name="sex" value="1"> 男</label>
            <label><input type="radio" name="sex" value="2"> 女</label>
        <br>
        爱好:
            <label><input type="checkbox" name="fav" value="1">篮球</label>
            <label><input type="checkbox" name="fav" value="2">足球</label>
            <label><input type="checkbox" name="fav" value="3">排球</label>
            <label><input type="checkbox" name="fav" value="4">水球</label>
            <label><input type="checkbox" name="fav" value="5">气球</label>
        <br>
        城市:
        <select name="city">
            <option value="1">北京</option>
            <option value="2">天津</option>
            <option value="3">唐山</option>
            <option value="4">廊坊</option>
            <option value="5">上海</option>
            <option value="6">其他</option>
        </select>
        <br>
        个性签名:<br>
        <textarea name="description" cols="30" rows="10"></textarea>
        <br>
        <input type="submit" value="提交表单">
        <input type="button" value="普通按钮">
        <button><img src="goods.png" width="30" height="30" alt=""></button>
        <input type="reset" value="重置表单数据">
    </form>
</body>
</html>

BASE64编码解码

import base64

# base64是一个专门用于处理网络传输数据格式的算法,网络中传输的二进制数据是不能直接被打印或提取的,所以一般都是转换成base64编码进行数据传输。
# 把二进制数据(0~1)经过base64算法形成base64编码
# base64编码主要是 64个字符组成:[0-9A-Za-z+/]
# python内置了base64模块,提供了2个方法给我们对二进制数据进行编码与解码

# 编码
with open("1.jpeg", "rb") as f:
    code = base64.b64encode(f.read()).decode()
    print(f"data:image/jpeg;base64,{code}")

# 解码
content = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4pLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAEsASwDASIAAhEBAxEB/8QAGwAAAQUBAQAAAAAAAAAAAAAABAABAgMFBgf/xAA4EAEAAQMDAwIEBAUEAgIDAAABAgADEQQhMRJBUQVhE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CLj5VtHp0DEmAvO5ye1Wmkh1BCAOOKi21U5wBYlNMo/aiiPA1YWpk2AYTtipRt3DAihy0e1YbBtgc1IFUDcqyNqXTkFT6UpRnLDEx5DbFAxGKoKcc0/VI3HZ4M0pW5xxMMjs57VEhP4axMg5zzSC3rc7745pm5gU3zxVZCTLA4HbOakWp9bbw9T7lG08OXJCih4qTcMbvFR6GVtBMw7HOXtS6SUeoRTk4aAkyHGHdpLnzUFIhMMi4y9qeQweo3i7CcfamDkjikyMviozERMI7ZDikxRBXKc84+dBJKb5WmE8tMmMdSme7/ADquUo52mUAUxE7UgA9ynKb/AHUlEmy0hQDFP/anxtQDY23pgxvjNSKZaWAzv5+VLBimkuCn7UA2Nu1Pjbbmk0vNGAxs4xUyMWDlc9tqjHmnXdphEi7lJE7fWpK4aXelgQDnzSyqD32qX+6maASsZZEUMCUy5imNvc71IMlN3aYIyoimOKTnKBgeacpHagEyyEXLE4McUkGIYcnd7fKk8UxQDzkqLjJwY2qBKZcJqGODHPzqyXJ86i8tMHZHV1GwvAbU85MpZ2xzgqPemHeloSLk2w25AucjShJtyzAQTcXPzqJy0w7tMjuIomcrvl2f7UmSzZnbOMO+ffzTv8L86i7UjKMm3cEx04MnmlCbbv8AXgRzk4qLz9qd4+tMYdYkpdMTpeBch71GFyUYMEEd3Lj5VB5pS2NvFIjxnKMhw5iuAdvanuSZLKJiTnqc7P0qE+D6UjemEyX6AI7gZXGz7e1Vtoy9EXHyqR3+dNmlgf/Z"
img_content = content.split(",")[-1]
with open("2.jpeg", "wb") as f:
    content = base64.b64decode(img_content.encode())
    print(content)
    f.write(content)

标签:单行,Day02,base64,文本框,表单,输入框,HTML,2.2,属性
From: https://www.cnblogs.com/dream-ze/p/17222234.html

相关文章