 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
jQuery :disabled Selector
The :disabled() selector in jQuery is used to select all disabled input elements.
Syntax
The syntax is as follows −
$(":disabled")  Example
Let us now see an example to implement the :disabled() selector −
<!DOCTYPE html> <html> <head> <style>    .one {       color: brown;       background-color: orange;       font-size: 16px;       border: 2px blue dashed;    } </style> <script src="https://code.jquery.com/jquery-3.4.1.js"></script> <script>    $(document).ready(function(){       $(":disabled").addClass("one");    }); </script> </head> <body> <form action=""> ID: <input type="text" name="id"><br> Rank: <input type="text" name="rank" disabled="disabled"><br> Fav. Subjects: Maths: <input type="checkbox" name="sub" value="maths"> English <input type="checkbox" name="sub" value="english"><br> <input type="submit" value="Submit"><br> </form> </body> </html> Output
This will produce the following output −

Advertisements
 