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'), ':以上为获取的全部内容')
}
-
Notifications
You must be signed in to change notification settings - Fork 0
mcdowell8023/node_project
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
node_project by mcdowell
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published