jquery bootstrap 复制文本到剪切板插件(非flash)
Html: Copy JS: $('.btn-copy').copy();
Html:
Copy
JS:
$('.btn-copy').copy({
copy: function(_this){
return _this.parents('div').find('.inp-link').val();
},
afterCopy: function(res, _this){
if(res==true){
alert('Copied text to clipboard。');
}else{
alert('Copy failed!');
}
}
});
Html:
Copy
something
JS: