第006讲 iframe 浮动窗口 表单及表单控件

iframe的使用

场景:有时我们需要在含有body的页面直接嵌入另外一个页面,形成画中画效果,那就得使用iframe浮动窗口实现

入门案例
<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>iframe</title>
 </head>
 <body>
  <h1>iframe简单使用</h1>
  <a href="http://www.taobao.com" target="one">跳转</a>
  <br/>
  <iframe name="one" src="https://www.baidu.com/s?ie=UTF-8&wd=%E7%A0%81%E4%BA%91" width="500px" height="400px"/>
  <br/>
  <iframe src="http://www.jikedaohang.com/sheji.html" width="500px" height="400px"/>
 </body>
</html>

html 常用标记/元素-form

form图解:

image

如图:
我们需要将很多数据提交到服务器处理,比如注册用户、发帖等。。由此产生表单元素

常见的:输入框、复选框、密码框、文本域等等

基本结构:

一般来说 表单元素 通常是被 包裹的,form 标签内部 通常包含 action 和 method 属性如果不写的话会有一个默认值
form表单内部如果有提交类型按钮 也就是 type 类型为 submit 的这样的话 action=”url” 这个url就是submit提交接收数据的url,method 就是这个url接收的方式即 GETPOST
案例:
主界面:

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>登录注册</title>
 </head>
 <body>
 <!-- form表单内部如果有提交类型按钮 也就是 type 类型为 **submit** 的这样的话 action="url" 这个url就是submit提交接收数据的url,
 method 就是这个url接收的方式即 **GET** 或 **POST** -->
   <form action="loginsuccess.html"  method="GET">
    用户名:<input type="text" name="username"/>
    <br/>
    密 码:<input type="password" name="userpwd"/>
    <br/>
    <input type="submit" name="git" value="登陆"/>    <input type="reset" name="reset" value="重置"/>
  </form>
 </body>
</html>

image

成功界面:

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>登陆成功</title>
 </head>
 <body>
    登陆成功ok!
 </body>
</html>

当前原理展示:

image

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

有时有晌

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值