Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 jquery 计算 div 文本的高度或字数?
你可以使用 height(),试试这个
var height = $("div").height();
O 和数词会是这样的
var words = $('div').text().split(' ').length;