0

I need to use the copy() function for my website, which I found can be used in the console of Webkit browsers but not in the markup of my page. So what I wanted to ask is, how do I write some javascript code which triggers execution of code in Webkit consoles?

Thanks,

Lucas

N.B. Please comment on any misunderstandings or vague points in my question. I will strive to improve.

P.S. I got this copy() idea from here: Secret copy to clipboard Javascript function in Chrome and Firefox?

Community
  • 1
  • 1
Lucas
  • 16,930
  • 31
  • 110
  • 182

1 Answers1

1

You can't access the clipboard from javascript due to security reasons. You could use flash though. See the answer to this question:

How do I copy to the clipboard in JavaScript?

Community
  • 1
  • 1
mihai
  • 37,072
  • 9
  • 60
  • 86