2015-09-12から1日間の記事一覧
appendChildの逆 をやりたい e = document.querySelector('.main') e.insertBefore(div, e.firstChild) appendChildの逆をするにはinsertBefore をfirstChildに対して適用する。 でも面倒なのです。 Node.prototype.prependChild = function(e){ this.insert…
appendChildの逆 をやりたい e = document.querySelector('.main') e.insertBefore(div, e.firstChild) appendChildの逆をするにはinsertBefore をfirstChildに対して適用する。 でも面倒なのです。 Node.prototype.prependChild = function(e){ this.insert…