//更换两个元素的位置 var exchange=function (el1, el2) { var ep1 = el1[0].parentNode, ep2 = el2[0].parentNode, index1 = Array.prototype.indexOf.call(ep1.children, el1), index2 = Array.prototype.indexOf.call(ep2.children, el2); ep2.insertBefore(el1, ep2.childre