How do I get a string within a certain height of div?

for example: a div with a height of 600px containing the content of the article. I want to get the string within the height of the div 300px. Can it be achieved?

Jun.10,2021

  1. get the padding font size. A series of spacing or something. Figure it out by yourself
  2. assign a value to it character by character. Until the div exceeds your threshold.

these things actually depend on you, for example, they happen to have an average height in the 300px, but they are generally not there. So does this business count.


var arr = [];
$.each($('div'),function(i,item){
    if($(item).height()<=300){
       arr.push($(item).text())
    }
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c0a8-2b025.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c0a8-2b025.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?