We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第170天 用js实现一个复制粘贴的功能
The text was updated successfully, but these errors were encountered:
核心代码应该就是
obj.select();//通过选中对象再执行复制命令 document.execCommand("Copy")
Sorry, something went wrong.
; (function () { const createInput = html => { let inputEl = document.createElement('input'); inputEl.setAttribute('type', 'input'); inputEl.value = html; return inputEl; } var key = '¥5uA302Tea83¥'; var inputEl = createInput(key); document.body.appendChild(inputEl) inputEl.select(); document.execCommand('copy') })();
var btn = document.getElementById('btn') btn.addEventListener('click', function() { input.select() document.execCommand('copy') })
No branches or pull requests
第170天 用js实现一个复制粘贴的功能
The text was updated successfully, but these errors were encountered: