Click here to Skip to main content
15,914,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I want to disable all elements who contains class name pqr.

<input class = "abc pqr" id = "txt" type="text">
<input class = "abc pqr" id = "chk" type="checkbox">
<input class = "xyz pqr" id = "file" type="file">
<input class = "abc pqr" id = "date" type="date">
<select class = "abc pqr jkl">
<input class = "pqr" id = "date" type="radio">



How to achieve above things.

What I have tried:

I have tried with attr attribute.
Posted
Updated 13-Mar-18 20:10pm

1 solution

JavaScript
$(".abc").prop("disabled", "disabled");

.prop() | jQuery API Documentation[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900