<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>input-url</title>【input的type属性设置为url,则表示该输入框的类型为网址】
<title>input-email</title>【Input的type属性设置为email,则表示该输入框的类型为邮箱】
</head>
<body>
<form method="post" action="save.php">把浏览者输入的数据传送到服务器端
【<form method="传送方式" action="服务器文件">】
<label for="username">用户名:</label>
<input type="text" name="username" id="username" value="" />
<label for="pass">密码:</label>
<input type="password" name="pass" id="pass" value="" />
<input type="submit" value="确定" name="submit" />
<input type="reset" value="重置" name="reset" />
<form method="post" action="save.php">
账户:<input type="text【文本输入】" name="myname"/>
<br>
<input type="text" placeholder="请输入用户账号">【放提示的输入信息】
密码:<input type="password【密码输入】" name="pass"/>
<input type="number"> 【只允许填数字】
<textarea cols【列】="50" rows【行】="10">在这里输入内容...</textarea>当用户需要在表单中输入大段文字时,需要用到文本输入域
<label>性别:</label>(单选框,选择框)
<label>男</label>
<input type="radio" value="1" name="gender" />【当 type="radio" 时,控件为单选框
当 type="checkbox" 时,控件为复选框】
<label>女</label>
<input type="radio" value="2" name="gender" />
<select>
<option value="看书">看书</option>
<option value="旅游" selected="selected">旅游</option>
<option value="运动">运动</option>
<option value="购物">购物</option>
</select>
select标签里面只能放option标签,表示下拉列表的选项。
<form method="post" action="save.php">
【
type:只有当type值设置为submit时,按钮才有提交作用
value:按钮上显示的文字
】
<label for="myName">姓名:</label>
<input type="text" value=" " name="myName " />
<input type="submit" value="提交" name="submitBtn" />
</form>
</form>
</body>
</html>