实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>作业</title> </head> <body> <h1>用户注册</h1> <form action=""> <p> <label for="username">账号:</label> <input id='username' name="username" type="text" value="" maxlength="10" autofocus placeholder='请输入字母或数字10位以内'> </p> <p> <lable for='password'>密码:</lable> <input id='password' name='password' type="password" maxlength="16" placeholder='请输入字母或数字16位以内' autofocus> </p> <p> <lable for='emali'>邮箱:</lable> <input id='emali' name='emali' type="emali" placeholder='请输入邮箱' autofocus> </p> <p> <lable for='age'>年龄:</lable> <input id='age' name='age' type="number" placeholder='请输入年龄' autofocus> </p> <p> <lable for='birthday'>生日:</lable> <input id='birthday' name='birthday' type="date" autofocus> </p> <p> <label for="course">课程:</label> <select name="course" id="course" size="1"> <optgroup label="前端"> <option value="0" selected>请选择</option> <option value="1" >HTML5</option> <option value="2">CSS3</option> <option value="3">JavaScript</option> </optgroup> <optgroup label="后端"> <option value="4">PHP</option> <option value="5">MySQL</option> <option value="6">ThinkPHP</option> </optgroup> </select> </p> <p> <label for="hobby">爱好:</label> <input type="checkbox" id="game" ><label for="game">篮球</label> <input type="checkbox" id="programme" ><label for="programme">书法</label> <input type="checkbox" id="movies" value="programme"><label for="movies">看电影</label> </p> <p> <label for="Gender">性别:</label> <input type="radio" name="gender" value="male" id="male"><label for="male">男生</label> <input type="radio" name="gender" value="female" id="female"><label for="female">女生</label> <input type="radio" name="gender" value="secrecy" id="secrecy"><label for="secrecy">保密</label> </p> <p> <label for="comment">简介</label> <br> <textarea name="comment" id="comment" cols="30" rows="10" maxlength="30" placeholder="不超过30个字"></textarea> <br> <button >提交</button> <input type="reset" name="reset" value="重置"> </p> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例