$(":enabled")
$("button:enabled")
<!DOCTYPE html>
<html>
<head>
<title> jQuery :enabled selector </title>
<script src = "/ajax/libs/jquery/3.3.1/jquery.min.js"> </script>
<script>
$(document).ready(function() {
$('button').click(function(){
$(":enabled").css({"background-color": "yellow", "border": "2px dashed blue"});
});
});
</script>
</head>
<body>
<form action = "#">
<h1> Welcome to the bianchenghao6.com </h1>
<h2> This is an example of using jQuery :enabled selector </h2>
<div>
First name: <input type = "text"> <br/> <br/>
Middle name: <input type = "text" disabled = "disabled"> <br/> <br/>
Last name: <input type = "text"> <br/> <br/>
Mobile no.: <input type = "text"> <br/> <br/>
Telephone: <input type = "text" disabled = "disabled"> <br/> <br/>
<input type = "submit" id = "inp" disabled = "disabled">
<button> Click me </button>
</div>
</form>
</body>
</html>
Welcome to the bianchenghao6.com
This is an example of using jQuery :enabled selector
Middle name:
Last name:
Mobile no.:
Telephone:
<!DOCTYPE html>
<html>
<head>
<title> jQuery :enabled selector </title>
<script src = "/ajax/libs/jquery/3.3.1/jquery.min.js"> </script>
<script>
$(document).ready(function() {
$('button').click(function(){
$("textarea:enabled").css({"background-color": "yellow", "border": "2px dashed blue"});
});
});
</script>
</head>
<body>
<form action = "#">
<h1> Welcome to the bianchenghao6.com </h1>
<h2> This is an example of using jQuery :enabled selector </h2>
<div>
First name: <input type = "text"> <br/> <br/>
Middle name: <input type = "text" disabled = "disabled"> <br/> <br/>
Last name: <input type = "text"> <br/> <br/>
Mobile no.: <input type = "text"> <br/> <br/>
About Yourself: <textarea> </textarea> <br/> <br/>
Qualification: <select>
<option> Xth </option>
<option> XIIth </option>
<option> UG </option>
<option> PG </option>
</select> <br/> <br/>
<input type = "submit" id = "inp" disabled = "disabled">
<button> Click me </button>
</div>
</form>
</body>
</html>
Welcome to the bianchenghao6.com
This is an example of using jQuery :enabled selector
Middle name:
Last name:
Mobile no.:
About Yourself:
Qualification: