textarea width (minus scrollbar) using jQuery
Here's a quickie.
Basically, I want the width of a textarea element -- minus the width of the 开发者_JAVA百科scrollbar if one is present. I could just use the clientWidth DOM property, but I don't know if this is cross-browser. I'm sure jQuery has some method (.width() returns the width including scrollbar), but I can't seem to figure out what it is.
Thanks!
clientWidth is cross browser compatible as reported by quirksmode.org (an authority on the matter.) http://quirksmode.org/dom/w3c_cssom.html
精彩评论