Is it possible to get width of text inside a textarea element?
I don't want $('textarea').val().length
per se, as it doesn't depend on font-size.
I would prefer the absolute width of the text inside.
It's well possible this information is impossible to get hold of.
Workaround idea:
span
element with the font size settings of the textarea .text(value)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.