零剪贴板的困难 [英] difficulty with zeroClipboard
问题描述
我正在使用zeroClipboard,但我无法使其正常工作.
I am using zeroClipboard but I don't manage to have it working.
这是我的HTML标记:
Here is my HTML markup:
<div id= 'd_clip_button'>
<img class = 'displayed' src="{{ asset('bundles/yopyourownpoet/images/CopyPoemPage8.png') }}" alt="Copy Poem" height="71" width="300" />
</div>
和javascript:
And the javascript:
<script src="{{ asset('bundles/yopyourownpoet/js/ZeroClipboard.js') }}" type="text/javascript"></script>
<script>
$(document).ready(function() {
ZeroClipboard.setMoviePath("{{ asset('bundles/yopyourownpoet/flash/ZeroClipboard.swf') }}");
var clip = new ZeroClipboard.Client();
clip.setText( "aaaa" );
clip.glue( 'd_clip_button' );
clip.addEventListener( 'onLoad', function(){ alert('loaded baby'); } );
});
</script>
我看到了警报满载的婴儿". 但是,我从来没有在剪贴板中复制过文本. 我在计算机和服务器上都在本地尝试过.
I see the alert 'loaded baby'. However, I never have the text copied in my clipboard. I tried on local on my computer and on the server as well.
我也转到了此页面 http://www. macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html 和自动Flash,但仍然无法正常工作.
I also went to this page http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html and autorized flash, but still not working.
我做错了什么?
推荐答案
如果您在ZeroClipboard方面遇到麻烦,则可以尝试使用以下jquery插件:
If you are having troubles with zeroClipboard, you might want to give this jquery plugin a try: http://www.steamdev.com/zclip/
zclip基于zeroClipboard.易于安装和安装易于使用.
zclip is based on zeroClipboard. Easy to install & easy to use.
这篇关于零剪贴板的困难的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!