Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • How about somehow initiating a browser search (Ctrl+F) from javascript? But, I don't know how to do that from javascript. Commented Jan 25, 2011 at 8:36
  • You just wanna select the text or the additional tags too? And what is the purpose of just selecting it? It would help if you explained what do you want to do with the text. Commented Jan 25, 2011 at 8:44
  • @pea window.find(string) Commented Jan 25, 2011 at 9:11
  • 1
    That will work fine for obtaining just the text that is selected but will not tell you anything about the HTML elements that contain the text. What do you actually want? Commented Jan 25, 2011 at 9:24
  • @All - Its a Simple program, I just want the selected text to be Displayed on the screen . But when Two different paragraphs are selected then This Code doesn't seem to work ... Commented Jan 25, 2011 at 12:12