标记语言(接9.13号)
网页中加网页(iframe)
属性包括:
1)src:值为URL------(插入的网页链接)
2)width,height:值为数字或百分比-----(插入网页的长宽值)
3)scrolling:
a.值为auto----(滚动条根据情况自动显示或隐藏)
b.值为yes/no---(滚动条显示/隐藏)
4)frameborder:值为0/1-----(插入的网页否/是有边框)
5)name:值为任意-----(插入的网页名称)
举例:
目的:建立"网页1.html","网页2.html",“网页1.html”内容包含“点击此处”的锚点,当点击“点击此处”时,网页跳转至“网页2.html”。
步骤:1.新建网页2,编辑网页2的内容。
2.新建网页1并打开"网页1.html",在<body></body>之间编辑内容如下:
<iframe src="网页1.html" name=名字>
</iframe>
<a href="网页2.html" target="名字">打开网页2
</a>
插入表格(table)
属性包括
1)border:值为1/0------有无边框
2)cellpadding:值为数字------文本与边框的距离
1)cellspacing:值为数字------单元格之间的距离
基本样式:
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>-------表示表格包括两行五列
还需注意:
合并列 colspan 合并行 rowspan 加粗 front-weight:border 在表头thead里面“列”的表示td换做hd,则表示加粗。
表单结构------(可以在网页上输入)
表单结构(form)
属性包括:
1.action:值为URL------表示输入的数据传输到的终点位置
2.method:值为get-------提交的数据会显示在新开的网页后面,不安全。
值为post------提交的数据不会直接显示在新开的网页后面,会以特殊的编码输出,无法看见,安全;有“提交文件”必须使用post.
3.enctype="multipart/form-data"-----有文件上传时,from必须有这个属性。
4.name名称;id名称唯一的标识号
输入控件
文本框(input)
属性包括:
1.disable:禁止输入
2.value:值为text等------加载页面显示的预设值,可更改。text
3.name:命名
4.readonly:只读
5.disable:禁止输入
6.type:
1.text/password等
2.radio 单选
3.checkbox 多选
4.file 选择文件
5.hidden 隐藏
6.reset 重置
提交
1.submit 用value命值
2.type="image" arc="" 由图片代替提交按钮
.按钮
buttle 用value命值
下拉列表(select)
属性包括 1.size 加载时的可见选项个数,如不能完全显示,则自动生成滚动条 2.name 命名 格式:
<select>
<option value="1">内容1</option>
<option value="2">内容2</option>
<option value="3">内容3</option>
</select>
效果:
注意:如果需要选中多个选项,需要在select中增加multiple属性,则按住CTRL或者ALT键,点击选项
多行文本框(textarea)
属性包括
1.rows 加载时的可见行数
2.columns 加载时的可见宽度