var songlists = document.querySelectorAll('.song_list__txt'); var songlistss = document.querySelectorAll('.song_list__desc'); var allSongLists = '';

for (var i = 0; i < songlists.length && i < songlistss.length; i++) { allSongLists += songlists[i].textContent + ' ' + songlistss[i].textContent + '\n'; }

console.log(allSongLists);

JavaScript 代码:提取并合并网页歌曲列表信息

原文地址: https://www.cveoy.top/t/topic/owab 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录