jQuery API | 返回首页目录 | jQuery API 中英文对照版 |
width() |
width()Returns the css width value for the first matched element. If used on document, returns the document's width (innerWidth) If used on window, returns the viewport's (window) width 返回值Object 示例jQuery 代码:$("#testdiv").width()结果:"200px"jQuery 代码:$(document).width();结果:800jQuery 代码: $(window).width();结果:400 |