function getAllContents(tag = '.content') {
// 看书工具函数
let arr = document.querySelectorAll(tag)
let contents = []
for (let i = 0; i < arr.length; i++) {
const item = arr[i]
contents.push(item.textContent)
}
const str = contents.toString()
// console.log(str,'i')
console.log(contents.join('\r\n'), ':以上为获取的全部内容')
}mcdowell8023/node_project
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|