如何通过phonegap安卓插件实现复制(到剪贴板)黏贴操作
2012-09-13 18:06
459 查看
今天试验了phonegap的复制(到剪贴板)黏贴操作发现还蛮好用
下面说说怎么用:
lz按照教程写了一个demo,大家可以去我qq群共享下载:250395324(自己写死了一段文字然后复制到剪贴板最后输出显示弹出屏幕)
1.首先我们可以去github下载插件
https://github.com/phonegap/phonegap-plugins/tree/master/Android/ClipboardManager
2.然后按照说明的教程一步一步去配置:
The plugin creates the object
the methods
given string
returns the text from the Clipboard
callback functions.
An example for copy:
An example for paste:
demo大家可以去我qq群共享下载:250395324
下面说说怎么用:
lz按照教程写了一个demo,大家可以去我qq群共享下载:250395324(自己写死了一段文字然后复制到剪贴板最后输出显示弹出屏幕)
1.首先我们可以去github下载插件
https://github.com/phonegap/phonegap-plugins/tree/master/Android/ClipboardManager
2.然后按照说明的教程一步一步去配置:
The plugin creates the object
window.plugins.clipboardManagerwith
the methods
copy(str, success, fail)that copies the
given string
paste(success, fail)that
returns the text from the Clipboard
successand
failare
callback functions.
An example for copy:
window.plugins.clipboardManager.copy( "the text to copy", function(r){alert("copy is successful")}, function(e){alert(e)} );
An example for paste:
window.plugins.clipboardManager.paste( function(r){alert("The text in the clipboard is " + r)}, function(e){alert(e)} );
demo大家可以去我qq群共享下载:250395324
相关文章推荐
- 如何通过直接复制frm文件以实现恢复/复制innodb数据表?
- iOS开发_iphone 实现剪贴板操作_iphone 复制粘贴功能
- Vmware中如何让本地和虚拟机可以通过复制和粘贴操作
- Vmware中如何让本地和虚拟机可以通过复制和粘贴操作
- 如何通过GridView实现数据库的CRUD操作
- iOS开发_iphone 实现剪贴板操作_iphone 复制粘贴功能(转)
- javascript操作两个选择列表(有两个列表,如何实现在一个列表通过双击和多选列表中内容添加到另一个列表. )
- 【转载】兼容所有浏览器的JQuery zClip插件实现复制到剪贴板功能
- 如何用插件实现操作校验
- JQuery zClip插件实现复制页面内容到剪贴板
- C#操作剪贴板实现复制粘贴
- [Selenium]如何通过Selenium实现Ctrl+click,即按住Ctrl的同时进行单击操作
- 通过JS+H5实现复制内容到剪贴板上
- Phonegap安卓如何通过点击Contact获得联系人列表的名字和电话
- jQuery插件Zclip实现完美兼容个浏览器点击复制内容到剪贴板
- C#操作剪贴板实现复制粘贴
- iOS开发_iphone 实现剪贴板操作_iphone 复制粘贴功能
- [Selenium]如何通过Selenium实现Ctrl+click,即按住Ctrl的同时进行单击操作
- winform程序如何通过操作注册表来实现限制使用次数
- phonegap(安卓)如何实现微博认证登录