<p><button class="ui button" onclick="copyResponse()">复制结果</button></p>
<script>
function copyResponse() {
  var response = document.getElementById("chatgpt-response").value;
  if(response) {
    navigator.clipboard.writeText(response);
    alert("复制成功!");
    var resultDiv = document.getElementById("result");
    resultDiv.innerHTML = response;
  } else {
    alert("没有结果可复制!");
  }
}
</script>
我想1按钮点击复制textarea id=chatgpt-response placeholder=的内容成功的话提示复制成功显示在2的 div class=ui menu mt-30里面重新代码1 button class=ui button复制结果button2 body header class=ui sticky menu id=sticky-header div c

原文地址: https://www.cveoy.top/t/topic/c5xK 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录