15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

jQueryで要素がdisabledかどうかを判定する

Last updated at Posted at 2016-03-19

自分用メモ。

ある要素がdisabledかどうかを判定したい場合にはisメソッドで判定を行うことができる。
isメソッドはレシーバのjQueryオブジェクトの状態を判定してbooleanを返す。

$(要素).is(':disabled') 

また、要素が指定したidを持っているかを判定したい時は、下記の様に書くこともできる。

$(要素).is('id名')

参考サイト
jQuery isの利用方法 – 条件式を満たす場合に要素を操作 – Change the elements if the condition is satisfied http://zxcvbnmnbvcxz.com/jquery-is/

15
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?