HTML标签表单标签表单项select和textarea以及注册界面案例
HTML标签表单标签_表单项select和textarea
select:下拉列表
子元素:option,指定列表项
testarea:文本域
cols:指定列数,每一行有多少个字符
rows:默认多少行
<form action="#" method="get"> <label for="username">用户名:</label><input type="text" name="username" placeholder="请输入用户名" id="username"><br> 密码:<input type="password" name="password" placeholder="请输入密码"><br> 性别:<input type="radio" name="gender" value="male" checked="checked"> 男 <input type="radio" name="gender" value="female"> 女 <br> 爱好:<input type="checkbox" name="hobby" value="shopping"> 逛街 <input type="checkbox" name="hobby" value="java"> JAVA <input type="checkbox" name="hobby" value="game" checked="checked"> 游戏 <br> 图片:<input type="file"><br> 隐藏域:<input type="hidden" value="aaa"> <br> 取色器:<input type="color"> <br> 生日:<input type="date" name="birthday"> <br> 生日:<input type="datetime-local" name="birthday"> <br> 邮箱:<input type="email" name="email"> <br> 年龄:<input type="number" name="age"> <br> 省份:<select name="province"> <option value="">--请选择--</option> <option value="1">北京</option> <option value="2">上海</option> <option value="3">陕西</option> </select> <br> 自我描述:<textarea cols=20 rows="5" name="des"></textarea> <br> <input type="submit" value="登录"> <input type="button" value="一个按钮"><br> <input type="image" src="img/regbtn.jpg"> </form>
HTML标签注册界面案例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>注册页面</title> </head> <body> <!--定义表单 form--> <form action="#" method="post"> <table border="1" align="center" width="500"> <tr> <td><label for="username">用户名</label></td> <td><input type="next" name="username" id="username"></td> </tr> <tr> <td><label for="password">密码</label></td> <td><input type="password" name="password" id="password"></td> </tr> <tr> <td><label for="email">Email</label></td> <td><input type="email" name="email" id="email"></td> </tr> <tr> <td><label for="name">姓名</label></td> <td><input type="next" name="name" id="name"></td> </tr> <tr> <td><label for="tel">手机号</label></td> <td><input type="number" name="tel" id="tel"></td> </tr> <tr> <td><label>性别</label></td> <td> <input type="radio" name="gender" value="male"> 男 <input type="radio" name="gender" value="female"> 女 </td> </tr> <tr> <td><label for="birthday">出生日期</label></td> <td><input type="date" name="birthday" id="birthday"></td> </tr> <tr> <td><label for="checkcode">验证码</label></td> <td> <input type="date" name="checkcode" id="checkcode"> <img src="img/verify_code.jpg"> </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="注册"> </td> </tr> </table> </form> </body> </html>

浙公网安备 33010602011771号