This commit is contained in:
✨小透明・宸✨
2020-11-20 12:09:26 +08:00
parent dfebc0239f
commit 0136324a02
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -157,7 +157,7 @@ function addComment(avatar, name, content, date) {
}); });
var tr = document.createElement('tr'); var tr = document.createElement('tr');
tr.innerHTML = '<th>' + (document.getElementById('configCommentList').childElementCount + 1) + '</th><th>' + name + '</th><th>' + content + '</th><th>' + date.toLocaleString() + '</th>'; tr.innerHTML = '<th>' + commentList.length + '</th><th>' + name + '</th><th>' + content + '</th><th>' + date.toLocaleString() + '</th>';
document.getElementById('configCommentList').append(tr); document.getElementById('configCommentList').append(tr);
} }
@@ -165,7 +165,7 @@ function addComment(avatar, name, content, date) {
function removeComment() { function removeComment() {
if (commentList.length) { if (commentList.length) {
commentList.pop(); commentList.pop();
document.getElementById('configCommentList').removeChild(document.getElementById('configCommentList').childNodes[document.getElementById('configCommentList').childElementCount]); document.getElementById('configCommentList').removeChild(document.getElementById('configCommentList').lastChild);
} }
} }