Clipboard.js cannot copy the content to the clipboard

 <span class="confirmButton" data-clipboard-text="Test Text"></span>
    function copyToClipBoard() {
        var clipboard = new Clipboard(".confirmButton");
        console.log(clipboard);
        clipboard.on("success", function (e) {
           alert("1");
        });

        clipboard.on("error", function (e) {
            alert("2");
        });
    }

there is no alert output, only console output.

Mar.13,2021

if you are in a chrome browser, it may be because flash, is disabled. Take a look at

clipboard.png

is there a prompt to disable flash in the browser URL


resolved. The button that triggered the copy event was not clicked.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37c7b-2c0c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37c7b-2c0c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?