最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Paste an image into a web page - Stack Overflow

programmeradmin1浏览0评论

Is it in any way possible, using javascript (jquery), html (5) to get a pasted image.

e.a a user click the printscreen button, opens a web page, clicks CTRL+V and the image is uploaded to the server (without the need to save to a local pc)

is it achievable through flash, java, any other technology?

ty

Is it in any way possible, using javascript (jquery), html (5) to get a pasted image.

e.a a user click the printscreen button, opens a web page, clicks CTRL+V and the image is uploaded to the server (without the need to save to a local pc)

is it achievable through flash, java, any other technology?

ty

Share Improve this question edited Oct 20, 2011 at 12:56 Jonas 129k101 gold badges326 silver badges405 bronze badges asked Dec 16, 2010 at 9:41 AlexeyAlexey 6421 gold badge7 silver badges21 bronze badges 2
  • Here is a similar question: stackoverflow.com/questions/361324/… – Olivier Payen Commented Dec 16, 2010 at 9:51
  • possible duplicate of Pasting an image from clipboard to a website – Quentin Commented Jun 2, 2012 at 10:40
Add a comment  | 

3 Answers 3

Reset to default 10

Yes, this is possible in pure JavaScript, assuming either Google Chrome or Chrome Frame.

View a live demo of a jQuery plugin that cleanly wraps the HTML Clipboard API. This works by getting binary image data from the Ctrl+V paste event into JavaScript.

Google Docs supports drag-n-drop in everything but MSIE, however it still does not support copy & paste of images:

https://drive.googleblog.com/2010/10/drag-and-drop-images-in-documents.html

I don't think it's possible using plain html/javascript, but you can do it using a java applet. Ex: Radinks upload control

发布评论

评论列表(0)

  1. 暂无评论