【发布时间】:2013-09-06 19:00:37
【问题描述】:
This is an example DIV where when selected and paste (CTRL+V) it will paste a text or image on the div:
<div contenteditable="true" id="capture" style="height: 100px; width: 100px; "
onpaste='handlepaste(this, event)'></div
这里的问题是我的应用程序将隐藏这个div 并且基本上用户找不到它的位置。那么有没有一种方法可以触发粘贴事件并且文本或图像被粘贴到这个 div 上,甚至没有在页面中选择?
更新:
我的意思是,我将隐藏 div 的原因是我不需要我的应用程序来显示正在捕获的图像或文本。它只需要它稍后获取捕获的图像或文本。
【问题讨论】:
-
不在 jquery 中?你只想要 javascript?
标签: javascript jquery html