1.ZeroClipboard.js需要点击两次才复制成功
var footer = $('<div class="modal-footer text-right "><button type="button" class="ub-btn ub-btn-default zclip">全部复制到剪切板</button> </div>')
var client = new ZeroClipboard($('.zclip',footer));
$('.zclip',footer).click(function(){
alert("出行人信息复制成功,随处粘贴可用!")
client.setText(textarea.val());
});
1.重点:目录文件:这个底层是flash 所以保证swf文件与脚本在同级目录
2.data-clipboard-target="content"设置属性
3.本测试用的2.X