function insertAfter(ele,html){ var new_ele = document.createElement("div"); new_ele.innerHTML = html; var parent = ele.parentNode || document.body; parent.insertBefore(new_ele.firstChild, ele.nextSibling);}var d = document.getElementById("test");insertAfter(d,"dddddddd")
aItem1Item2Item3Item4b
var d = document.getElementById("test");d.childNodes;//...d.previousSibling;//nulld.nextSibling;//nulld.parentNode;//bodyd.firstChild;//ad.lastChild;//bd.lastChild.textContent;//bd.lastChild.previousSibling.innerHTML;//Item4d.childElementCount;//4d.lastElementChild;//Item4d.childNodes.length;//9d.childNodes[0];//"a"d.childNodes[1];//Item1d.childNodes[2];//""