HTML13:文本框和单选框
表单元素格式
代码show
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>10.表单</title>
</head>
<body>
<h1>注册</h1>
<!--
action: 表单提交的位置,可以是网站,也可以是一个请求处理地址
method:post,get提交方式
get方式提交:我们可以在url中看到我们提交的信息,不安全,高效
post:比较安全,传输大文件
-->
<form action="我的第一个HTML.html" method="get">
<!-- 文本输入框:input type="text"
value= "工一" 默认初始值
maxlength="10" 最长能写几个字符
size="30" 文本框的长度
-->
<p>名字:<input type="text" name="username" value= "工一" maxlength="10" size="30"/></p>
<!-- 密码框: input type="password" -->
<p>密码:<input type="password" name="pwd"/></p>
<p>性别:
<!--单选框标签
input type="radio"
value="boy" 单选框的值
name="sex" 表示组
-->
<input type="radio" value="boy" name="sex" />男
<input type="radio" value="girl" name="sex" />女
</p>
<p><input type="submit"/><input type="reset"></p>
</form>
</body>
</html>