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图解:
如图:
我们需要将很多数据提交到服务器处理,比如注册用户、发帖等。。由此产生表单元素
常见的:输入框、复选框、密码框、文本域等等
基本结构:
一般来说 表单元素 通常是被 包裹的,form 标签内部 通常包含 action 和 method 属性如果不写的话会有一个默认值
form表单内部如果有提交类型按钮 也就是 type 类型为 submit 的这样的话 action=”url” 这个url就是submit提交接收数据的url,method 就是这个url接收的方式即 GET 或 POST
案例:
主界面:
<!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>
成功界面:
<!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>
当前原理展示: