Код: Выделить всё
function Hello() {
var text_to_copy = document.getElementById("quote").innerHTML;
navigator.clipboard.writeText(text_to_copy).then(
function(){
alert("Copied successfully"); // success
})
.catch(
function() {
alert("Error"); // error
});
}
Подробнее здесь: https://stackoverflow.com/questions/716 ... e-to-alert
Мобильная версия