开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜