博主信息
博文 35
粉丝 0
评论 0
访问量 32838
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
4. 实例演示表单以及常用控件元素的使用(必须掌握)
锋芒天下的博客
原创
840人浏览过

<!DOCTYPE html>

<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>0702-作业4</title>
</head>
<body>

   <h1>用户注册</h1>

   <form action="" method="get" name="register">
       <p>
           <label for="username">账号:</label>
           <input type="text" id="username" name="username" placeholder="请输入用户名" autofocus>
       </p>

       <p>
           <label for="password">密码:</label>
           <input type="password" id="password" name="password" placeholder="请输入密码">
       </p>

       <p>
           <label for="email">邮箱:</label>
           <input type="email" id="email" name="email" placeholder="3231228515@qq.com" required>
       </p>

       <p>
           <label for="age">年龄:</label>
           <input type="number" id="age" name="age" min="16" max="60">
       </p>
       
       <p>
           <label for="birthday">生日:</label>
           <input type="date" id="birthday" name="birthday">
       </p>
       
       <p>
           <label for="sourse">请选择:</label>
           <select name="aourse" id="sourse">
               <option value="">1</option>
               <option value="" selected>2</option>
               <option value="">3</option>
           </select>
       </p>

       <p>
       <label for="box">复选框:</label>
       <input type="checkbox" name="box" id="box" checked><label for="box">课程1</label>
       <input type="checkbox" name="box" id="bo"><label for="bo">课程2</label>
       <input type="checkbox" name="box" id="b"><label for="b">课程3</label>
       </p>


       <p>

           <label for="nv">单选框:</label>
           <input type="radio" id="nan" name="xingbie" checked><label for="nan">男</label>
           <input type="radio" id="nv" name="xingbie"><label for="nv">女</label>

       </p>

       <label for="text">文本框:</label>
       <textarea name="" id="text" cols="30" rows="10" maxlength="30" placeholder="请输入文字"></textarea>

       <p>
       <input type="submit" value="提交">
       <input type="reset" value="重置">
       </p>
       <button type="submit">提交</button>
       <button type="button">ajax提交</button>
   </form>


</body>
</html>

批改状态:合格

老师批语:完成的不错,继续加油
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学