我正在使用zeroClipboard,但是我不能让它工作。
下面是我的HTML标记:
<div id= 'd_clip_button'>
<img class = 'displayed' src="{{ asset('bundles/yopyourownpoet/images/CopyPoemPage8.png') }}" alt="Copy Poem" height="71" width="300" />
</div>和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>我看到了“已装载的婴儿”的提示。但是,我从不将文本复制到我的剪贴板中。我在我的电脑和服务器上都尝试了本地。
我也去了这个页面的http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html和自动闪存,但仍然不能工作。
我能做错什么呢?
发布于 2012-05-15 16:32:54
如果您在使用jquery时遇到问题,您可能想尝试一下这个zeroClipboard插件:http://www.steamdev.com/zclip/
zclip基于zeroClipboard。易于安装和使用。
发布于 2013-09-19 08:13:09
截至2013年8月31日,FYI...ZeroClipboard项目似乎仍受到active...just的影响。https://github.com/zeroclipboard/ZeroClipboard
我刚刚通过ASP控件在我的Visual Studio2010ASP C#项目中成功地使用了它。凉爽的!颠簸!
https://stackoverflow.com/questions/10569084
复制相似问题