节点(每个元素都会有的3个nodeValue nodeType nodeName;)

  1 元素节点 nodeName 元素节点名 nodeType 1 nodeValue null或者undefined

  2属性节点 nodeName 属性节点名 nodeType 2  nodeValue 属性节点的值

  3 文本节点 nodeName #text nodeType  3 nodeValue 文本值

2 创建元素节点 document.createElement('li')

3创建文本节点document.createTextNode("123");

4 属性节点 通过元素节点.属性名去创建或者 node.setAttribute(name,value);获取节点的属性值  node.getAttribute(name);移除节点的属性值 node.removeAttribute(name);

5追加节点 node.appendChild(newchild);

6 删除节点 node.parentNode.removeChild(node);

7 克隆节点 node.cloneNode(true);

8 替换节点node.replaceChild(nwchild, oldchild); 除了具有替换节点的功能,还具有移动节点的功能;可以自定义函数replaceEach(achild,bchild) 两个节点彼此替换位置;

9父节点 paraentNode  子节点 firstElementChild firstChild  lastElementChild   lastChild 下一兄弟节点nextSibling  nextElementSibling  前一兄弟节点previousSibling  previousElementSibling;

10节点的获取

  document.getElementById('');

   document.getElementsByTagName('');

  document.getElementsByClassName('')

  document.getElementsByName('');

最新文章

  1. C#+OpenGL+FreeType显示3D文字(2) - 用GLSL+VBO绘制文字
  2. 在VMware Workstation上安装CentOS6.5系统步
  3. Android HTTPS(5)SSL测试工具
  4. [原创] Ubuntu Linux 安装Eclipse
  5. callback调用测试
  6. JAVA学习路线图---(JAVA1234)
  7. jquery 事件委托绑定click的使用方法
  8. 使用Entity Framework时要注意的一些性能问题
  9. 常见HTTP状态码大全
  10. 黑马程序员——Java高级应用(一)
  11. 字符设备驱动4: ioremap
  12. Kubernetes运维生态-cAdvisor分析
  13. pytorch实现VAE
  14. 一步一步创建ASP.NET MVC5程序[Repository+Autofac+Automapper+SqlSugar](八)
  15. SpringCloud实战-Hystrix请求熔断与服务降级
  16. C. Nice Garland Codeforces Round #535 (Div. 3) 思维题
  17. 灯箱效果插件Magnific Popup详解
  18. UBUNTU 安装教程
  19. 廖雪峰Java3异常处理-2断言和日志-2使用JDK Logging
  20. powerDesigner 把name项添加到注释(comment)

热门文章

  1. jsp urlrewrite 中正則表達式不包括某个字符串写法
  2. leetCode解题报告5道题(七)
  3. Cannot find the class file for javax.servlet.ServletContext.
  4. css3模糊图片
  5. less03 混合
  6. sass04 嵌套、继承、占位符
  7. BZOJ2179: FFT快速傅立叶 & caioj1450:【快速傅里叶变换】大整数乘法
  8. caffe(1) 网络结构层参数详解
  9. linux下python3源码安装及卸载
  10. luogu P3157 [CQOI2011]动态逆序对(CDQ分治)