Home  >  Article  >  Web Front-end  >  jquery: what is the selector of disabled

jquery: what is the selector of disabled

coldplay.xixi
coldplay.xixiOriginal
2020-11-19 14:16:453230browse

In jquery, ":disabled" is a form filter selector, used to select all disabled form elements (such as input or button), the syntax format is "$(":disabled")".

jquery: what is the selector of disabled

The operating environment of this tutorial: Windows 7 system, jquery version 1.10.2. This method is suitable for all brands of computers.

jquery :disabled selector

Definition and usage

:disabledThe selector selects all disabled form elements.

Syntax

$(":disabled")

Example

Select all disabled d5fd7aea971a85678ba271703566ebfd and bb9345e55eb71822850ff156dfde57c8 elements:




 

<script>
$(document).ready(function(){
  $(&quot;:disabled&quot;).css("background-color","red");
});
</script>

用户名:
ID: 年龄:

Related free learning recommendations: JavaScript (video)

The above is the detailed content of jquery: what is the selector of disabled. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn