<div id="content"></div>
<button class="btn btn-info" id="copy">copy</button>
<button class="btn btn-info" id="read">read</button>
const copy=document.querySelector("#copy")
copy.addEventListener("click", function(){
navigator.clipboard.writeText("hello");
})
const read=document.querySelector("#read")
read.addEventListener('click', function(){
navigator.clipboard.readText().then(text => {
alert(text); // 剪貼簿中的文本內容
});
})
// $("#read").click(function(){
// })