Visual Studio Code
- 2 ответа
- 0 вопросов
2
Вклад в тег
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<input class="input" type="text" />
</body>
<script src="./index.js"></script>
</html>
const input = document.querySelector('.input');
input.addEventListener('focus', (e) => {
navigator.clipboard.writeText(e.target.value);
});