I want to select the text in a paragraph when I click or double click the <p> tag. Not highlight, just like using mouse to make a select area to choose text to be selected!
I have several paragraph and *.rar file link addresses on the page, and I want to select all the text when I click on one of them. I think the textbox could work that way but I like it to be in a paragraph or link tag.
Is there a way to select all text in paragraph by clicking another element?
Here’s a function that will select the contents of the element you pass to it: