本文介绍了Zclip在jsfiddle工作但不在本地工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
它很奇怪::
当地拥有相同代码:
<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工作但不在本地工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!