var list =document.getElementById('test-list');
var first=list.children[0];
var last=list.children[list.children.length-1];
list.insertBefore(last,first);
list.appendChild(first);
你这个不算排序,这些题目就是要你自己去百度一下再写,liaoxuefeng的教程只是 师傅领进门
Sign in to make a reply
Van_Schrodinger
var list =document.getElementById('test-list');
var first=list.children[0];
var last=list.children[list.children.length-1];
list.insertBefore(last,first);
list.appendChild(first);