jQuery innerWidth() メソッド

❮ jQuery HTML/CSS メソッド

<div> 要素の inner width を返す:

$("button").click(function(){
    alert($("div").innerWidth());
});
Try it Yourself »

定義と用法

innerWidth() メソッドは、最初にマッチした要素の inner width を返します。

下の図が示すように、このメソッドは、パディングを含み、ボーダーとマージンは含みません。

jQuery Dimensions


関連するメソッド:


構文

$(selector).innerWidth()

Try it Yourself - 例

関連するメソッドを使用しサイズを表示する
width()、height()、innerHeight()、innerWidth()、outerWidth() および outerHeight() の使用方法。


❮ jQuery HTML/CSS メソッド