Home  >  jQuery

Example of :disabled Selector in jQuery

May 03, 2013
:disabled in jQuery selects all the disabled element. And that collection of disabled elements can be used for any value update. Syntax is
(Any element ):disabled 
 
Find the example.

<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
<form>
<input type="text" disabled="disabled" />
<input type="text" />
<input type="text" disabled="disabled" />
</form>
<script>
$("input:disabled").val("this is disabled");
</script>
</body>
</html>
 




Output
FIND MORE TUTORILAS






©2019 concretepage.com | Privacy Policy | Contact Us