jQuery Multiple choices


Total available count: 24
Subject - JavaScript Frameworks
Subsubject - jQuery

Look at the following selector: $(":disabled"). What does it select?


 

 

 

 



A


Solution:-

The :disabled selector selects all disabled form elements.

For disabled selector syntax is as follows:
$(":disabled")

For disabled selector example is as follows:

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
 $(":disabled").css("background-color", "red");
});
</script>
</head>
<body>

<form action="">
Name: <input type="text" name="user"><br>
ID:<input type="text" name="id" disabled="disabled">

Age:
<select disabled="disabled">
 <option>20-30</option>
 <option>30-50</option>
 <option>50+</option>
</select>
<input type="submit">
</form>

</body>
</html>

 




Next 5 multiple choice(s)

1

Which jQuery method is used to remove selected elements?

2

Look at the following selector: $("p#intro"). What does it select?

3

Is jQuery a W3C standard?

4

Look at the following selector: $("div p"). What does it select?

5

Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?

Comments