htdocs/blogs/displayComments.js

13 lines
483 B
JavaScript
Raw Normal View History

2024-05-30 01:52:07 +02:00
let div = document.getElementById("comments");
let divText = div.innerHTML
let length = div.className
console.log(divText,length)
newPageHTML=""
2024-11-02 02:03:32 +01:00
for (let comment = 0; comment < comments[length].length; comment++) {
2024-05-30 01:52:07 +02:00
newPageHTML+=`<b>${comments[length][comment][0]}</b>: <i>${comments[length][comment][1]}</i><b\
r/>`
}
div.innerHTML = newPageHTML