form表单之input标签

id相当于每个标签的身份证   “#abc”#号标识id号  配合锚标签href="#abc"使用

type="text" 文本明文  type="password"密文

type="checkbox"多选框  type="radio"单选框

type="submit"提交 value="提交注册"  作为显示

type="button"也是提交,配合js使用

浏览器跑的是http协议,通过键值对形式发送给server端,封装成一个对象,server进行解析成字典

form表单之input标签_第1张图片

DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Titletitle>
head>
<body>
<h1>注册页面h1>
<form action="http://192.168.1.5:8888" enctype="multipart/form-data">
    <p>姓名<input type="text" name="username" placeholder="姓名">p>
    <p>密码<input type="password" name="password">p>
    <p>爱好:音乐<input type="checkbox" name="hobby" value="music">电影<input type="checkbox" name="hobby" value="movie">p>
    <p>性别:男<input type="radio" name="gender" value="men"><input type="radio" name="gender" value="women">p>
    <p><input type="file" name="getfile" >p>
    <p><input type="submit" value="提交注册">p>

form>
body>
html>
View Code

form表单之input标签_第2张图片form表单之input标签_第3张图片form表单之input标签_第4张图片form表单之input标签_第5张图片form表单之input标签_第6张图片

转载于:https://www.cnblogs.com/jintian/p/11042896.html

你可能感兴趣的:(form表单之input标签)