jQuery innerWidth() 方法
jQuery 教程
· 2019-03-27 14:26:52
实例
返回 <div> 元素的内部宽度:
$("button").click(function(){
alert($("div").innerWidth());
});
定义和用法
innerWidth() 方法返回第一个匹配元素的内部宽度。
如下面的图像所示,该方法包含 padding,但不包含 border 和 margin。
相关方法:
- width() - 设置或返回元素的宽度
- height() - 设置或返回元素的高度
- innerHeight() - 返回元素的高度(包含 padding)
- outerWidth() - 返回元素的宽度(包含 padding 和 border)
- outerHeight() - 返回元素的高度(包含 padding 和 border)
语法
$(selector).innerWidth()
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
The Elements of Statistical Learning
Trevor Hastie、Robert Tibshirani、Jerome Friedman / Springer / 2009-10-1 / GBP 62.99
During the past decade there has been an explosion in computation and information technology. With it have come vast amounts of data in a variety of fields such as medicine, biology, finance, and mark......一起来看看 《The Elements of Statistical Learning》 这本书的介绍吧!