I have a text input field I want to make easy for people to copy the contents. The input box contains a url which is longer than the length of the input field.
I know using JavaScript alone I can't make copy the value to clipboard on click. I have to use a Flash method like zeroclipboard which is something I don't want to do.
Currently I'm trying to make it pre-highlighted, and stays highlighted, so people just have to right click the text and copy it. How can I do this? And are there any other methods which are more preferred?
<input type="text" value="sample text..." />