我从来没有使用过zclip,但是在googling之后我知道如何调用zclip。
$("#copy").zclip({
path: "js/ZeroClipboard.swf",
copy: function(){
return $(this).prev().val();
}
});但是我有很多按钮,它们是作为共享按钮工作的。单击函数执行的任何按钮。我必须在函数中复制一个字符串。
function copy(commentId){
var share_path = window.location.protocol + window.location.host + window.location.pathname + '#';
share_path += <?='"'.$sharePath.'"';?> + commentId;
//copy the string share_path
alert(share_path);
}你怎么解决这个问题?请和我分享一下。
发布于 2013-12-20 05:35:39
我刚做了这个
prompt('Please copy this link to share', share_path);希望它也能对你有用。
https://stackoverflow.com/questions/20692238
复制相似问题