jQuery वस्तुनिष्ठ प्रश्न और उत्तर:
प्रतियोगी परीक्षाओं के लिए jQuery वस्तुनिष्ठ प्रश्न और उत्तर । उत्तर के साथ ये वस्तुनिष्ठ प्रश्न बोर्ड परीक्षाओं के साथ-साथ प्रतियोगी परीक्षाओं के लिए बहुत महत्वपूर्ण हैं। इस आर्टिकल में jQuery से संबंधित जानकारी को मुख्य रूप से प्रतियोगी और बोर्ड की परीक्षाओं के लिए बनाया गया है।
1. If the names of variables are the same, then which of the following type of variable takes precedence?
- local variable
- global variable
- both (a) & (b)
- None of the above
Answer: local variable
2. Which of the following jQuery method is used to reduce the set of matched elements to a single element?
- isEqual() method
- val() method
- eq() method
- delegate() method
Answer: eq() method
3. CDN stands for –
- Content development network
- Content delivery network / Content distribution network
- Communication development network
- None of the above
Answer: Content delivery network / Content distribution network
4. Which of the following is the correct code in jQuery to make all div elements 150px high?
- $(“div”).height(150);
- $(“div”).height = “150” ;
- $(“div”).height = 150 ;
- None of the above
Answer: $(“div”).height(150);
5. Which of the following is the basic requirement to start with jQuery?
- To use jQuery, first, we have to buy the jQuery library from its official website.
- To use jQuery, we don’t require anything as it is already built in the browser we are using.
- To use jQuery, we have to refer to its hosted library, or we can download the latest jQuery version from its official website.
- All of the above
Answer: To use jQuery, we have to refer to its hosted library, or we can download the latest jQuery version from its official website.
6. The jQuery method used to find all previous sibling elements of the current element is –
- nextAll() method
- prevAll() method
- siblings() method
- None of the above
Answer: prevAll() method
7. Can we use multiple document.ready() function on the same page?
- Yes
- No
- Can’t say
- Not possible
Answer: Yes
8. The jQuery method used to return the direct parent element of the selected element is –
- parents() method
- parent() method
- offsetParent() method
- None of the above
Answer: parent() method
9. The jQuery method used to load data using HTTP get is –
- get(URL, data, callback, dataType) method
- post(URL, data, callback, dataType) method
- ajax() method
- ajaxSend() method
Answer: get(URL, data, callback, dataType) method
10. Which of the following jQuery method is used to add/remove one or more classes from the selected elements?
- toggleClass() method
- fadeToggle() method
- toggle() method
- slideToggle() method
Answer: toggleClass() method
11. What does the syntax $(“p”) will select?
- All paragraph elements
- Only first paragraph element
- Only last paragraph element
- None of the above
Answer: All paragraph elements
12. Which of the following selector in jQuery is used to select the elements with lesser index value than the value of its index parameter?
- jQuery :lt() selector
- jQuery :gt() selector
- jQuery :lang() selector
- jQuery :nth-child selector
Answer: jQuery :lt() selector
13. What does the syntax $(“p span”) will select?
- All span elements inside the paragraph element
- Only first span element inside the paragraph element
- Only last span element inside the paragraph element
- None of the above
Answer: All span elements inside the paragraph element
14. The selector $(“:disabled”) will select –
- The elements with the text “:disabled”
- The elements that do not include the text “:disabled”
- The hidden elements
- All disabled input elements
Answer: All disabled input elements
15. Which of the following method in jQuery is used to make copies of the set of matched elements?
- jQuery detach() method
- jQuery delegate() method
- jQuery clone() method
- jQuery serialize() method
Answer: jQuery clone() method
16. Which of the following jQuery method returns the direct children of the selected element?
- jQuery ancestors() method
- jQuery next() method
- jQuery children() method
- None of the above
Answer: jQuery children() method
17. The jQuery method which is used to remove the tabs, space and the line breaks from the beginning and end of the specified string is –
- jQuery empty() method
- jQuery trim() method
- jQuery remove() method
- jQuery serialize() method
Answer: jQuery trim() method
18. Which of the following jQuery method returns all siblings of the selected element?
- jQuery ancestors() method
- jQuery siblings() method
- jQuery parents() method
- None of the above
Answer: jQuery siblings() method
19. The jQuery selector used to select the elements with the specified language code is –
- jQuery :contains selector
- jQuery :lang() selector
- jQuery :nth-child selector
- None of the above
Answer: jQuery :lang() selector
20. The jQuery selector used to select the elements containing the specified string is –
- jQuery :contains selector
- jQuery :lang() selector
- jQuery :nth-child selector
- None of the above
Answer: jQuery :contains selector
21. Which of the following jQuery method is used to replace all selected elements with new HTML elements?
- jQuery replaceWith() method
- jQuery replaceAll() method
- jQuery load() method
- jQuery delegate() method
Answer: jQuery replaceAll() method
22. Which of the following jQuery method is used to merge the content of two or more objects into the first object?
- jQuery extend() method
- jQuery eq() method
- jQuery data() method
- jQuery param() method
Answer: jQuery extend() method
23. The jQuery method used to trigger a specified event handler for the selected element is –
- jQuery trigger() method
- jQuery toggle() method
- jQuery eq() method
- jQuery next() method
Answer: jQuery trigger() method
24. Which of the following method is used to remove the specified attribute from the selected element?
- jQuery remove() method
- jQuery empty() method
- jQuery removeAttr() method
- jQuery error() method
Answer: jQuery removeAttr() method
25. Which sign does jQuery use as a shortcut for jQuery?
- the % sign
- the ? Sign
- the $ sign
Answer: the $ sign
26. Is jQuery a library for client scripting or server scripting?
- Server scripting
- Client scripting
Answer: Server scripting
27. With jQuery, look at the following selector: $(“div”). What does it select?
- All div elements
- The first div element
Answer: All div elements
28. Is it possible to use jQuery together with AJAX?
- No
- Yes
Answer: Yes
29. jQuery is a
- JavaScript Library.
- JavaScript Language
- JavaScript Method
- PHP Method
Answer: JavaScript Library.
30. Which jQuery method is used to perform an asynchronous HTTP request?
- jQuery.ajaxAsync()
- jQuery.ajax()
- jQuery.ajaxSetup()
Answer: jQuery.ajax()