Украина, Днепр
(095) 478-70-11
Скопировать текст в буфер обмена очень просто, для этого достаточно воспользоваться Async Clipboard API
function copySentText(text) { navigator.clipboard.writeText(text).then(function() { showNotify('Successfully copied'); }, function(err) { showErrorNotify('Error copied'); }); } function showNotify(message, from, background) { if (typeof from === 'undefined') { from = 'bottom'; } if (typeof background === 'undefined') { background = '#111112'; } $.notify({ icon: 'logo.png', message: message, }, { icon_type: 'image', type: 'success', animate: { enter: 'animated bounceIn', exit: 'animated bounceOut' }, placement: { from: from }, template: '' + '' }); } function showErrorNotify(message, from, background) { background = '#000018'; showNotify(message, from, background); }
' + '{2}' + '
Copyright © 2012-2023 All rights reserved.
created by WPS.