第401章 第401章 暗算
十界仙尊最新章节列表,十界仙尊无弹窗广告-69书吧
//从小到大排序
function smalltobig() {
allarrsort(function (a, b) { return aname - bname });
appenddom();
}
//从大到小排序
function bigtosmall() {
allarrsort(function (a, b) { return bname - aname });
appenddom()
}
//取出所有li的data-num属性放进数组
getdom()
function getdom() {
("catalog ul li")each(function (m) {
domarr[m] = (this)attr("data-num");
htmlarr[m] = (this)html();
})
for (var i = 0; i < domarrlength; i++) {
var activesubjectsobject = {};
for (var j = 0; j < htmlarrlength; j++) {
if (i == j) {
activesubjectsobjectname = domarr[i];
activesubjectsobjectvalue = htmlarr[j];
allarrpush(activesubjectsobject);
}
}
}
// consolelog(allarrlength)
}
//铺数据
function appenddom() {
("catalog ul")html("")
for (i = 0; i < allarrlength; i++) {
("catalog ul")append(
`{allarr[i]value}`
);
}
}