How to create copy alerts in JavaScript?
问题 I am working on a quote website project. Note the <span class="status-copy-alert">Copied</span> in part 1. In the css the visibility of span is hidden. Can anyone modify part 2 so when the the copy button next to the span in part 1 with onclick function is clicked, the span should be visible. Part 1 contents.innerHTML = paged.map(record => `<div class='latestatus'> <p class='copytxt'>${record.status}</p> <div> <button class="copystatus btn" onclick='copyTextToClipboard("${record.status}")'