Here's how to get the scrollHeight
of an element obtained using a jQuery selector:
$(selector)[0].scrollHeight
If selector
is the id of the element (e.g. elemId
), it is guaranteed that the 0-indexed item of the array will be the element you wish to select, and scrollHeight
will be correct.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…