![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript dom
love_your_life
让世界充满爱,再没有伤害
展开
-
addLoadEvent.js
function addLoadEvent(newfun){ oldfun = window.onload; if(typeof window.onload != “function”){ window.onload = newfun; }else { window.onload = function(){原创 2017-03-02 00:50:52 · 412 阅读 · 0 评论 -
insertAfter
javascript中提供了一些原有的方法,insertBefore就是其中一种 作用就是在元素之前插入新创建的元素; parent.insertBefore(newElement,targetElement); newElement为新创建的元素; targetElement为目标元素,新元素要插入到它之前; parent为targetElement的父元素; 但是javascript原创 2017-03-13 16:48:18 · 546 阅读 · 0 评论