How to copy text to the clipboard using js?

There is such vsplyvala in which the button "copy". upon clicking it, the contents of the text field to the left should be copied to the clipboard.


As it turned out, this is not an easy task. How to do it right? Support of browsers, such as IE7-10 - do not care.
July 9th 19 at 11:05
2 answers
July 9th 19 at 11:07
The first link in the search results
Without libraries - guillermo_Nienow30 commented on July 9th 19 at 11:10
: Libraries somehow inside work without libraries, look in the source and all. One hell why rewrite from sorrow, if you can take already existing code - Claudia42 commented on July 9th 19 at 11:13
: No Flash. No dependencies. Just 3kb gzipped - Edwin.Abbo commented on July 9th 19 at 11:16
July 9th 19 at 11:09

Find more questions by tags JavaScript