-1

How to directly save a clipboard image to client side using javascript?

Any sample source code?

Kos
  • 70,399
  • 25
  • 169
  • 233

2 Answers2

2

In a typical browser environment JavaScript cannot:

  • access the clipboard
  • access the filesystem

So what you want is impossible in normal circumstances.

If you have an unusual environment (such as a WSH environment, or Internet Explorer with low security settings and access to ActiveX) then it might be achievable, but how you do it would depend on the context you are running the code in.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

Easy in browsers that implement the Clipboard API. Check out this live demo with Google Chrome: http://strd6.com/2011/09/html5-javascript-pasting-image-data-in-chrome/

Daniel X Moore
  • 14,637
  • 17
  • 80
  • 92