jQuery API jQuery API 中英文对照版 - jQuery在线查询手册
width
width()

取得第一个匹配元素当前计算的宽度值(px)。

返回值:String

示例:

$("p").width();

HTML 代码:

<p>This is just a test.</p>

结果:

300

 
width()

Get the current computed, pixel, width of the first matched element.

Return value: String
Example:

 $("p").width();  
Before:
 <p>This is just a test.</p>  
Result:
 300