claro pero serian un contador de id.. osea id1, id2, id3... Se que hay una forma mas facil..
Yo encontre algo asi.. pero nose donde estaria el error
Código:
function scrolldown() {
var target = document.getElementById('divchat');
var isScrolledToBottom = target.scrollTop + target.offsetHeight >= target.scrollHeight;
if (isScrolledToBottom) {
target.scrollTop = target.scrollHeight - target.offsetHeight;
}
}
nose como implementarlo