楼主你试试我这个方式,你能不能接受!主要参考实现原理就好,引导流程和提示,你可以自己优化一下!
```
<!DOCTYPE html>
<html>
<head>
<title>Copy to Clipboard Example</title>
</head>
<body>
<input type="text" id="myInput" value="edge://settings/sidebar">
<button onclick="copyToClipboard()">Copy Text</button>
<script>
function copyToClipboard() {
var copyText = document.getElementById("myInput");
copyText.select();
document.execCommand("copy");
alert("请按键盘 Ctrl + Shift + L 快速打开设置");
}
</script>
</body>
</html>
```
@
InAndOut #1
@
qhd1988 #2
@
bojackhorseman #3
@
gorvey #5