Home »
MCQs »
jQuery MCQs
Which method is used to attach an event handler function to an HTML element when the form field gets focus?
35. Which method is used to attach an event handler function to an HTML element when the form field gets focus?
- focused()
- focuses()
- focuselement()
- focus()
Answer: D) focus()
Explanation:
The jQuery method focus() is used to attach an event handler function to an HTML element when the form field gets focus.