开发者

Reading the contents of Clipboard in FF

开发者 https://www.devze.com 2023-01-20 17:03 出处:网络
I am able to do that in IE, but FF doesn开发者_Python百科\'t allow to do something like: $(\"#txtBox\").bind(\'paste\', function (e) {

I am able to do that in IE, but FF doesn开发者_Python百科't allow to do something like:

$("#txtBox").bind('paste', function (e) {
        alert('pasting text!!!!');           
        alert(window.clipboardData.getData("Text"));
        window.event.returnValue = false;


    });

I am required to trap the clipboard contents onpaste, then populate a table with this content. We are allowing people to copy and paste from Excel.

What are some of the ways that are being used to achieve this in FF? Thanks


For the security reasons, you can't manipulate clipboard contents from JavaScript in Firefox.

If reading and writing clipboard contents is mandatory for your application, you may want to use Silverlight or Flash instead, or another RIA solutions (don't know if other solutions allow to manipulate clipboard).

0

精彩评论

暂无评论...
验证码 换一张
取 消