LLWiki正在建设中,欢迎加入我们!
“Widget:As-song”的版本间差异
跳转到导航
跳转到搜索
小 |
小 |
||
document.querySelectorAll( '.as-song-container' ).forEach(function(ele) {
var select = document.createElement('select'),
nodeList = ele.querySelectorAll('.as-song')
optionArray = [];
ele.insertBefore(select, ele.firstChild);
select.lang = 'ja';
var option = new Option(table.querySelector('big').textContent, i);▼
nodeList[0].style.display = 'table';▼
});
▲ var option = new Option(table.querySelector('big').textContent);
optionArray = optionArray.sort(function(a, b) {
return a.text <= b.text ? -1 : 1;
});
optionArray.forEach(function(option) {
select.add(option);
});
select.dataset.oldIndex = optionArray[0].value;
select.onchange = function() {
nodeList[select.dataset.oldIndex].style.display = 'none';
nodeList[select.dataset.oldIndex].style.display =
};
});
|