14

1-列举所有获取 DOM 元素的方法
document.getElementById();
document.getElementsByClassName();
document.getElementsByName();
document.querySelectorAll();
document.querySelector();
2-列举添加 DOM 元素的方法
parentDom.appendChild();
3-列举移除 DOM 元素的方法
parentDom.removeChild();
4-分别列举 BOM 常用对象 location navigator history screen 中的属性和方法
location:
location.href; 页面url 地址
location.hash; url 中#后的部分
location.search; url 中?后的部分(查询字符串)
location.reload(); 刷新页面;
navigator: navigator.userAgent: 浏览器的userAgent信息

history:
history.go(1);前进1步
history.go(-1);后退1步;
history.forward();前进
history.back(); 后退

screen:
screen.availWidth: 屏幕有效宽度
screen.availHeight: 屏幕有效高度

posted @ 2021-03-07 21:09  12138xx  阅读(31)  评论(0)    收藏  举报