一,框架
1. 使用frameset设置框架结构,使用frame来引入外部文件,其中注意,不能使用body标签。
垂直框架:
<html>
<frameset cols=”25%,75%”>
<frame src=”a.html”>
<frame src=”b.html”>
</frameset>
</html>
水平框架:
<html>
<frameset rows=”25%,75%”>
<frame src=”a.html”>
<frame src=”b.html”>
</frameset>
</html>
不支持框架时:<noframes></noframes>
2. frame标签属性:
frameborder:0、1是否显示框架边框;
name:规定框架的名称;
noresize:规定无法调整框架的大小;
scrolling:规定是否显示滚动条;
3.内连框架
<iframe src=”URL”width=”200” height=”200” frameborder=”0”></iframe>
通过src属性链接对应的文件:
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
修改链接路径文件是,通过a标签进行修改,在target属性值设置为iframe的name值:
<a href="http://www.baidu.com" target="iframe_a"> 百度 </a>
二,表单
1.用form标签来设置
<form action=”” method=”” onsubmit=”return fun()” enctype=“multipart/form-data”></form>
form标签的属性有:
action 数据提交地址;
method 数据的提交时所用的 HTTP 方法(GET 或 POST);
onsubmit 事件在表单提交时触发;
enctype 规定被提交数据的编码(默认:url-encoded);
2.一般常用的标签是input,输入类型由type来定义
输入框:
<input type=”text” name=”” placeholder=”请输入用户名”>
密码框:
<input type=”password” name=””>
单选按钮:
<input type=”radio” name=”” checked>
复选框:
<input type=”checkbox” name=””>
按钮:
<input type=”button” value=”按钮”>
隐藏域:
<input type=”hidden” name=”” value=””>
文件上传:
<input type=”file” name=””>
提交按钮:
<input type=”submit” value=”提交”>
重置按钮:
<input type=”reset” value=”重置”>
3.其他表单元素:
下拉框:
<select name=””>
<option value=”1”>香蕉</option>
<option value=”2” selected>苹果</option>
</select>
文本域:
<textarea rows=”5” cols=”30”></textarea>
4. 表单元素中的属性:
name 规定识别表单的名称
value 规定识别表单的值
checked 适用于单选和复选框,默认选中状态
selected 适用于下拉框,默认选中状态
placeholder 提供可描述输入字段预期值的提示信息
readonly 只读属性
disabled 不可用属性
rquired 必填属性