Answer the question
In order to leave comments, you need to log in
How to copy text from variable to google chrome clipboard?
I after a number of manipulations with lines receive the text in a variable. I need to copy and paste it into a browser popup window. How do I copy text from a variable to the clipboard?
Answer the question
In order to leave comments, you need to log in
using flash - google to the rescue
How to copy the address of the image by clicking on the element? - here they discussed the impossibility without a flash drive
Press F12 - the developer panel will open. There, go to the Console tab (js-console).
Enter the command console.log( variable name );
The displayed contents of the variable are selected with the mouse and copied to the clipboard in the standard way (Ctrl + C, or from the menu by the right mouse button).
Even better - directly in the js code, insert the command console.log( variable name ); - then the contents of the variable will be automatically displayed in the above console.
If you need to programmatically work with the clipboard, then you can install, for example, the jQuery zClip plugin: habrahabr.ru/post/159879
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question