![]() ![]() ![]() FluffyKitten at 15:05 I was trying to copy some text that are hidden from a user's input and interface so i do not have to select them manually thanks. Use Document.execCommand('copy') to copy the contents of the to the clipboard. at 15:01 JeremyThille You're right, I had thought they were trying to copy text from another element.Use lect() to select the contents of the element.Append the element to the current HTML document and use CSS to hide it to prevent flashing. ![]() Set its value to the string you want to copy to the clipboard.
0 Comments
Leave a Reply. |