JS WK 14 jQuery Practice Questions PDF
Document Details
Uploaded by BetterThanExpectedLearning9144
Yeungjin University
Tags
Summary
This document contains a set of practice questions that cover jQuery. The questions cover topics such as jQuery selectors, events., and DOM manipulations. The questions will test a student’s knowledge and help prepare them for assessments.
Full Transcript
JAVASCRIPT WEEK 14 1. What particular item in jQuery is described by the following sentences? One of the most important parts of jQuery library. Allows you to select and manipulate HTML elements. Used to "find" (or select) HTML elements. a. jQuery Selectors \# b. jQuery Even...
JAVASCRIPT WEEK 14 1. What particular item in jQuery is described by the following sentences? One of the most important parts of jQuery library. Allows you to select and manipulate HTML elements. Used to "find" (or select) HTML elements. a. jQuery Selectors \# b. jQuery Events c. DOM Manipulation d. CSS Manipulation 2. Which statement is false? a. jQuery Selectors are used to find HTML elements based on their name,, id, class, types, attributes, values of attributes and much more. b. jQuery selectors are based on existing CSS Selectors and in addition it has some own custom selectors. c. All selectors in jQuery start with the dollar sign and parentheses. d. The jQuery syntax is volatile -- made to adapt the performing action of the HTML element. \# 3. All but one is not the characteristics of of jQuery basic syntax. a. \$ b. (selector) c. jQuery action() d. & \# 4. What is the purpose of \$ in the syntax of jQuery? a. To define/ access jQuery \# b. To query HTML elements c. To determine the action to be performed on the elements d. To find HTML elements 5. What syntax is used to hide the element with id= "test"? a. \$("p").hide() b. \$("\#test").hide() \# c. \$(".test").hide() d. \$(this).hide() 6. How can you the elements with class="test"? a. \$("p").hide() b. \$("\#test").hide() c. \$(".test").hide() \# d. \$(this).hide() 7. How can you hide the current HTML element? a. \$("p").hide() b. \$("\#test").hide() c. \$(".test").hide() d. \$(this).hide() \# 8. How can you hide all \ elements? a. \$("p").hide() \# b. \$("\#p").hide() c. \$(".p").hide() d. \$(this ).hide() 9. What syntax can be used to select all elements? a. \$("\*") \# b. \$(this) c. \$("p.intro") d. \$("p:first") 10. What syntax can be used to select all \elements with class="intro"? a. \$("\*") b. \$(this) c. \$("p.intro") \# d. \$("p:first") 11. How can you select the first \ element of every \? a. \$("p.intro") b. \$("p:first") c. \$("ul li:first") d. \$("ul li:first-child") \# 12. How can you select the first \ element of the first \? a. \$("p.intro") b. \$("p:first") c. \$(" ul li:first") \# d. \$("ul li:first-child") 13. How can you select the first\ element? a. \$("p.intro") b. \$("p:first") \# c. \$("ul li:first") d. \$("ul li:first-child") 14. How can you select all even \ elements? a. \$("tr:even") \# b. \$("tr:odd") c. \$(":button") d. \$("\[href\]") 15. How can you select all elements with an href attribute? a. \$("href") b. \$("\[href\]") \# c. \$(href) d. \$("href:all") 16. How can you select all \ elements and \ element of type="button"? a. \$(":button") \# b. \$("button") c. \$(";button") d. \$(button) 17. How can you select all \ elements with a target attribute value not equal to "\_blank"? a. \$("a\[target!='\_blank'\]") \# b. \$("a\[target!="\_blank"\]") c. \$("a\[target!=\_blank\]") d. \$(a\[target!="\_blank"\]) 18. How can you select all \ elements with a target attribute value equal to "\_blank"? a. \$( "a\[target!='\_blank'\]") b. \$("a\[target!="\_blank"\]") c. \$("a\[target='\_blank'\]") \# d. \$("a\[target="\_blank"\]") 19. What particular item in jQuery is described by the following sentences? These are different visitor's action that a web page can respond to. It represents the precise moment when something happens. a. jQuery Selector b. jQuery Events \# c. DOM Manipulation d. CSS Manipulation 20. What is the basic syntax of jQuery events? a. \$("p").click() \# b. \$(selector).action() c. \$("p").hide() d. None of the above 21. Mouse events, keyboard events, form events and document/window events are examples of what? a. jQuery DOM events \# b. jQuery BOM events c. jQuery CSS events d. jQuery HTML events 22. mouseenter:mouseleave ; click: \_\_\_\_\_\_\_\_\_\_\_ a. doubleclick b. dblclick \# c. dblclck d. dlclick 23. keypress: keyboard events ; blur:\_\_\_\_\_\_\_\_\_\_ a. mouse events b. keyboard events c. form events \# d. window events 24. mouseenter: mouse events ; focus:\_\_\_\_\_\_\_ a. Mouse events b. Keyboard events c. Form events \# d. Window events 25. mouse events:click ; document events:\_\_\_\_\_\_\_\_\_\_ a. change b. focus c. blur d. scroll \# 26. window events: scroll ; form events:\_\_\_\_\_\_ a. load b. unload c. resize d. submit \# 27. Which group of item doesn't belong to the group of jQuery DOM events? a. click() and dblclick() b. mouseenter() and mouseleave() c. mousedown() and mouseup() d. mousetrap() and mousecatch() \# 28. What syntax in jQuery DOM events can be used to attach event handler to elements? a. hover() b. focus() c. blur() d. on() \# 29. Which method is described by the following statements? Takes two functions and is a combination of mouseenter() and mouseleave(). The first function is executed when the mouse enters HTML element, and the second function is executed when the mouse leaves HTML element. a. hover() \# b. focus() c. blur() d. on() 30. This method is executed when the form field loses focus. a. hover() b. focus() c. blur() \# d. on()