元素内容增加,滚动条跟着滚动||获得元素的标签名First Post: 2018-08-14Last Update: 2023-08-22元素内容增加,滚动条跟着滚动12$('.box').animate({scrollTop: $('.box')[0].scrollHeight}, 500);// box 为需要滚动的容器 获得元素的标签名document.getElementById("demo").tagName; 12345// jquery获取点击元素的标签名$('#demo').click(function() { console.log($(this)[0].tagName.toLowerCase()); // 在 HTML 中,tagName 属性的返回值始终是大写的,所以要转化为小写}); ∧ ≡