टेलीग्राम पर हमसे जुड़ेंClick Here
दैनिक करेंट अफेयर्स प्राप्त करें Click Here

jQuery वस्तुनिष्ठ प्रश्न और उत्तर

jQuery वस्तुनिष्ठ प्रश्न और उत्तर:

प्रतियोगी परीक्षाओं के लिए jQuery वस्तुनिष्ठ प्रश्न और उत्तर । उत्तर के साथ ये वस्तुनिष्ठ प्रश्न बोर्ड परीक्षाओं के साथ-साथ प्रतियोगी परीक्षाओं के लिए बहुत महत्वपूर्ण हैं। इस आर्टिकल में jQuery से संबंधित जानकारी को मुख्य रूप से प्रतियोगी और बोर्ड की परीक्षाओं के लिए बनाया गया है।

1. If the names of variables are the same, then which of the following type of variable takes precedence?

  1. local variable
  2. global variable
  3. both (a) & (b)
  4. 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?

  1. isEqual() method
  2. val() method
  3. eq() method
  4. delegate() method

Answer: eq() method

3. CDN stands for –

  1. Content development network
  2. Content delivery network / Content distribution network
  3. Communication development network
  4. 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?

  1. $(“div”).height(150);
  2. $(“div”).height = “150” ;
  3. $(“div”).height = 150 ;
  4. None of the above

Answer: $(“div”).height(150);

5. Which of the following is the basic requirement to start with jQuery?

  1. To use jQuery, first, we have to buy the jQuery library from its official website.
  2. To use jQuery, we don’t require anything as it is already built in the browser we are using.
  3. To use jQuery, we have to refer to its hosted library, or we can download the latest jQuery version from its official website.
  4. 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 –

  1. nextAll() method
  2. prevAll() method
  3. siblings() method
  4. None of the above

Answer: prevAll() method

7. Can we use multiple document.ready() function on the same page?

  1. Yes
  2. No
  3. Can’t say
  4. Not possible

Answer: Yes

8. The jQuery method used to return the direct parent element of the selected element is –

  1. parents() method
  2. parent() method
  3. offsetParent() method
  4. None of the above

Answer: parent() method

9. The jQuery method used to load data using HTTP get is –

  1. get(URL, data, callback, dataType) method
  2. post(URL, data, callback, dataType) method
  3. ajax() method
  4. 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?

  1. toggleClass() method
  2. fadeToggle() method
  3. toggle() method
  4. slideToggle() method

Answer: toggleClass() method

11. What does the syntax $(“p”) will select?

  1. All paragraph elements
  2. Only first paragraph element
  3. Only last paragraph element
  4. 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?

  1. jQuery :lt() selector
  2. jQuery :gt() selector
  3. jQuery :lang() selector
  4. jQuery :nth-child selector

Answer: jQuery :lt() selector

13. What does the syntax $(“p span”) will select?

  1. All span elements inside the paragraph element
  2. Only first span element inside the paragraph element
  3. Only last span element inside the paragraph element
  4. None of the above

Answer: All span elements inside the paragraph element

14. The selector $(“:disabled”) will select –

  1. The elements with the text “:disabled”
  2. The elements that do not include the text “:disabled”
  3. The hidden elements
  4. 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?

  1. jQuery detach() method
  2. jQuery delegate() method
  3. jQuery clone() method
  4. jQuery serialize() method

Answer: jQuery clone() method

16. Which of the following jQuery method returns the direct children of the selected element?

  1. jQuery ancestors() method
  2. jQuery next() method
  3. jQuery children() method
  4. 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 –

  1. jQuery empty() method
  2. jQuery trim() method
  3. jQuery remove() method
  4. jQuery serialize() method

Answer: jQuery trim() method

18. Which of the following jQuery method returns all siblings of the selected element?

  1. jQuery ancestors() method
  2. jQuery siblings() method
  3. jQuery parents() method
  4. None of the above

Answer: jQuery siblings() method

19. The jQuery selector used to select the elements with the specified language code is –

  1. jQuery :contains selector
  2. jQuery :lang() selector
  3. jQuery :nth-child selector
  4. None of the above

Answer: jQuery :lang() selector

20. The jQuery selector used to select the elements containing the specified string is –

  1. jQuery :contains selector
  2. jQuery :lang() selector
  3. jQuery :nth-child selector
  4. 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?

  1. jQuery replaceWith() method
  2. jQuery replaceAll() method
  3. jQuery load() method
  4. 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?

  1. jQuery extend() method
  2. jQuery eq() method
  3. jQuery data() method
  4. jQuery param() method

Answer: jQuery extend() method

23. The jQuery method used to trigger a specified event handler for the selected element is –

  1. jQuery trigger() method
  2. jQuery toggle() method
  3. jQuery eq() method
  4. jQuery next() method

Answer: jQuery trigger() method

24. Which of the following method is used to remove the specified attribute from the selected element?

  1. jQuery remove() method
  2. jQuery empty() method
  3. jQuery removeAttr() method
  4. jQuery error() method

Answer: jQuery removeAttr() method

25. Which sign does jQuery use as a shortcut for jQuery?

  1. the % sign
  2. the ? Sign
  3. the $ sign

Answer: the $ sign

26. Is jQuery a library for client scripting or server scripting?

  1. Server scripting
  2. Client scripting

Answer: Server scripting

27. With jQuery, look at the following selector: $(“div”). What does it select?

  1. All div elements
  2. The first div element

Answer: All div elements

28. Is it possible to use jQuery together with AJAX?

  1. No
  2. Yes

Answer: Yes

29. jQuery is a

  1. JavaScript Library.
  2. JavaScript Language
  3. JavaScript Method
  4. PHP Method

Answer: JavaScript Library.

30. Which jQuery method is used to perform an asynchronous HTTP request?

  1. jQuery.ajaxAsync()
  2. jQuery.ajax()
  3. jQuery.ajaxSetup()

Answer: jQuery.ajax()

Leave a Comment