1.

Which best explains getSelection()?(a) Returns the VALUE of a selected OPTION(b) Returns document.URL of the window in focus(c) Returns the value of cursor-selected text(d) Returns the VALUE of a checked radio inputI had been asked this question during an online interview.Enquiry is from Script Loading in chapter Invocation and Performance Navigation of JavaScript

Answer»

Right CHOICE is (c) Returns the VALUE of cursor-selected text

The best I can explain: The Window.GETSELECTION() method returns a Selection object representing the range of text selected by the USER or the current POSITION of the caret. The getSelection() method returns the value of the cursor-selected text.



Discussion

No Comment Found

Related InterviewSolutions