Zclip在jsfiddle工作但不在本地工作? [英] Zclip working on jsfiddle but not working locally?

查看:83
本文介绍了Zclip在jsfiddle工作但不在本地工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它很奇怪::


Jsfiddle: http://jsfiddle.net/sxeCM/4/ [工作]

当地拥有相同代码:

<html>
    <head>
    </head>
    <body>
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script src="http://www.steamdev.com/zclip/js/jquery.zclip.min.js"></script>
    <script>
    $(document).ready(function() {
        $('a#copy').zclip({
            path:'http://www.steamdev.com/zclip/js/ZeroClipboard.swf',
            copy:$('div#description').text()
        });
    });
    </script>
    <a id='copy' href="#">Copy</a>
    <div id='description'>this seems awesome</div>
    </body>
</html>

它在本地工作但在jsfiddle上按预期工作。我做错了什么?

Its not working locally but working as expected on jsfiddle. What am I doing wrong ?

推荐答案

听起来像是针对文件的安全限制之一:/// 网址。我最近在Webkit中玩过桌面通知,他们只是将无法在本地文件上启动,但如果通过 http:// 。

Sounds like one of those security restrictions against file:/// URLs. I recently played with desktop notifications in Webkit, and they just won't launch on local files, but would work fine if the file was accessed over http://.

这篇关于Zclip在jsfiddle工作但不在本地工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆