How to check if div is overflow in javascript. If they do, the should be displayed as dropdown, as...

How to check if div is overflow in javascript.  If they do, the should be displayed as dropdown, as...How to check if div is overflow in javascript.  If they do, the should be displayed as dropdown, as...