Blogger Information
Blog 34
fans 0
comment 0
visits 19974
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
表单及内联框架应用
OC的PHP大牛之路
Original
331 people have browsed it

表单元素

  1. 发送方式/请求方式
  2. 发送的数据
    2.1 自定义:用户自己输入,方式最灵活
    2.2 预定义:开发者写好,方式最安全

提交方式:
get默认的查询方式,将用户的查询参数用过url发送到服务器端
post常用于写操作,也可以查询,向服务器提交数据

案例

表单

  1. <h3>注册</h3>
  2. <form action="check.php" method="post">
  3. <div>
  4. <label for="uname">用户名:</label>
  5. <input type="text" id="uname" name="username" placeholder=" 用户名不能为空" autofocus>
  6. </div>
  7. <!-- 密码框 -->
  8. <div>
  9. <label for="psw">密码:</label>
  10. <input type="password" id="psw" name="password" placeholder="密码不能为空">
  11. <button>查看</button>
  12. </div>
  13. <!-- 单选按钮 -->
  14. <div>
  15. <label for="secret">性别:</label>
  16. <input type="radio" id="male" name="sex" value="nale"><label for="male"></label>
  17. <input type="radio" id="female" name="sex" value="fanale"><label for="famale"></label>
  18. <input type="radio" id="secret" name="sex" value="secret" checked><label for="secret">保密</label>
  19. </div>
  20. <!-- 复选框 -->
  21. <div>
  22. <label for="secret">爱好:</label>
  23. <input type="checkbox" id="game" name="hobby[]" value="nale"><label for="male">游戏</label>
  24. <input type="checkbox" id="trave" name="hobby[]" value="fanale"><label for="famale">旅游</label>
  25. <input type="checkbox" id="photography" name="hobby[]" value="secret" checked><label for="secret">摄影</label>
  26. </div>
  27. <!-- 下拉列表 -->
  28. <div>
  29. <label for="">学历:</label>
  30. <select name="edu" id="">
  31. <option value="0" selected disabled>--请选择--</option>
  32. <option value="1">高中</option>
  33. <option value="2">中专</option>
  34. <option value="3">大专</option>
  35. <option value="4">本科</option>
  36. <option value="5">研究生</option>
  37. </select>
  38. </div>
  39. <div>
  40. <button>提交</button>
  41. </div>
  42. </form>

https://www.php.cn/html/html-forms.html

媒体标签

  1. 多媒体标签
    video视频
    controls播放控件
    autoplay自动播放
    poster封面
    <video src="视频地址" width="300" controls autoplay poster="图片"></video>

  2. iframe内联框架标签(画中画)

案例

内联框架

  1. <div class="header">
  2. <h2>运动员资料后台</h2>
  3. <div>
  4. <em>admin</em>
  5. <a href="logout.php">退出</a>
  6. </div>
  7. </div>
  8. <ul>
  9. <li><a href="https://baike.baidu.com/item/%E9%99%88%E8%8A%8B%E6%B1%90/22894783?fr=aladdin" target="content">陈芋汐</a></li>
  10. <li><a href="https://baike.baidu.com/item/%E5%85%A8%E7%BA%A2%E5%A9%B5" target="content">全红婵</a></li>
  11. <li><a href="https://baike.baidu.com/item/%E9%99%88%E6%A2%A6/58107" target="content">陈梦</a></li>
  12. <li><a href="https://baike.baidu.com/item/%E5%AD%99%E9%A2%96%E8%8E%8E" target="content">孙颖莎</a></li>
  13. </ul>
  14. <iframe srcdoc="" frameborder="1" width="800" height="500" name="content"></iframe>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post