问题
Its strange ::
Jsfiddle : http://jsfiddle.net/sxeCM/4/ [ Working ]
Locally having the same code :
<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>
Its not working locally but working as expected on jsfiddle. What am I doing wrong ?
回答1:
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://
.
来源:https://stackoverflow.com/questions/13330472/zclip-working-on-jsfiddle-but-not-working-locally