Skip to content

Commit

Permalink
Update open-embed.html
Browse files Browse the repository at this point in the history
  • Loading branch information
sxgpyjg committed Nov 7, 2023
1 parent a53851a commit 3e97a1b
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions _includes/open-embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,6 @@
border: 0;
}
</style>
<script src="yourScript.js">
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>复制代码快捷键示例</title>
</head>

<body>
<textarea id="code" rows="10" cols="50"></textarea>

<script>
const codeInput = document.getElementById('code');

codeInput.addEventListener('keydown', (event) => {
if (event.ctrlKey && event.key === 'c') {
event.preventDefault(); // 阻止默认复制行为
codeInput.select(); // 选中代码框中的内容
document.execCommand('copy'); // 执行复制操作
alert('代码已复制'); // 弹出提示消息
}
});
</script>
</body>

</html>
</script>

<script>
function get_youtube_id(url) {
Expand Down

0 comments on commit 3e97a1b

Please sign in to comment.