jQuery API 返回首页目录 | jQuery API 中英文对照版
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  


 

相关链接
asp之家 | jQuery官方网站 | jQuery中文网 | 电子书作者网站 | 电子书作者blog