day32
集合总结
概念:
对象的容器,存储对象的对象,定义了对多个对象进行操作的常用方法
Colletion:单列集合
List:
有下标
元素可以重复
ArrayList,LinkedList,Vector
Set
无下标
元素不可重复
HashSet, LinkedHashSet, TreeSet
map:双列集合
存储一对数据
键不可重复
只可以重复
HashMap,HashTable,Properties, TreeMap
Collections:
集合工具类
定义了存取以外的常用的集合方法
web实现
html:hyper-text markup language,超文本标记语言
css:cascade style sheet,层叠样式表
JavaScript:js
html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <h1>Hello World</h1> <h2>Hello World</h2> <h3>Hello World</h3> <h4>Hello World</h4> <h5>Hello World</h5> <h6>Hello World</h6> <h7>Hello World</h7> Hello World </body> </html>h1-h6代表六级标题,注意只到h6,如果写了h7,h7标签不存在,里面的所有内容按照默认字体效果展示
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <h1>Hello World</h1> <h2>Hello World</h2> <h3>Hello World</h3> <h4>Hello World</h4> <h5>Hello World</h5> <h6>Hello World</h6> <h7>Hello World</h7> Hello World </body> </html>可以使用hr画矩形
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <img src="d:\saas\note\imgs\map.png" alt=""> <hr> <img src="imgs\map.png" alt=""> <hr> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""> </body> </html>用img标签可以实现插入图片
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <embed width="800" height="640" autostart="true" src="https://vdept3.bdstatic.com/mda-ji0i0dgxfnumgax7/v1-cae/sc/mda-ji0i0dgxfnumgax7.mp4?v_from_s=hkapp-haokan-nanjing&auth_key=1713155276-0-0-26fbb8d298fafd062d56552da84fdd12&bcevod_channel=searchbox_feed&pd=1&cr=2&cd=0&pt=3&logid=1676679751&vid=9697672074760132853&klogid=1676679751&abtest=" alt=""> <hr> <video width="800" height="640" controls> <source type="video/mp4" src="https://vdept3.bdstatic.com/mda-ji0i0dgxfnumgax7/v1-cae/sc/mda-ji0i0dgxfnumgax7.mp4?v_from_s=hkapp-haokan-nanjing&auth_key=1713155276-0-0-26fbb8d298fafd062d56552da84fdd12&bcevod_channel=searchbox_feed&pd=1" /> </video> <hr> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""> </body> </html>h5之前可以使用embed标签插入视频
h5可以使用video标签插入视频,效果更好
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <a href="html04.html">html04</a> <a href="https://www.baidu.com/?tn=15007414_12_dg">baidu</a> <a href="#abc">hello</a> <a href="html05.html#abc">hello</a> <a href="mailto:abc@qq.com">contact us</a><br> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <a name="abc"></a>hello <hr> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt=""><hr /> </body> </html>超链接有五种实现:
链接到指定页面
链接到本页面的指定位置
链接指定页面的指定位置
链接到外网地址
链接到邮箱
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <table border="1" width="800" height="300" align="center"> <tr> <th>编号</th> <th>姓名</th> <th>年龄</th> <th>性别</th> <th colspan="2">操作</th> </tr> <tr> <td>1</td> <td>张三</td> <td>18</td> <td rowspan="2">男</td> <td><a href="">修改</a></td> <td><a href="">删除</a></td> </tr> <tr> <td>2</td> <td>李四</td> <td>19</td> <td><a href="">修改</a></td> <td><a href="">删除</a></td> </tr> </table> </body> </html>表格标签,th是自带加粗和居中效果
注意行和列的合并
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <frameset rows="20%,70%, *"> <frame src="top.html" name="top"></frame> <frame src="center.html" name="center"></frame> <frame src="bottom.html" name="bottom"></frame> </frameset> </html><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <frameset cols="20%,70%, *"> <frame src="top.html" name="top"></frame> <frame src="center.html" name="center"></frame> <frame src="bottom.html" name="bottom"></frame> </frameset> </html><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <frameset rows="20%,70%, *"> <frame src="top.html" name="top"></frame> <frameset cols="20%, *"> <frame src="left.html" ></frame> <frame src="main01.html" name="mainFrame"></frame> </frameset> <frame src="bottom.html" name="bottom"></frame> </frameset> </html><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> left<p /><p /> <a href="main01.html" target="mainFrame">main01</a><p /> <a href="main02.html" target="mainFrame">main02</a><p /> </body> </html>框架布局:
rows可以控制需要排几行
cols可以控制需要拍几列
a标签的target的属性有五个值:
_self自身页面展示
_blank新页面展示
_top顶层页面展示
_parent父页面展示
frameName