this.$refs.clipboard.focus();
this.$refs.clipboard.select(); // 安卓
this.$refs.clipboard.setSelectionRange(0, this.$refs.clipboard.value.length); // 苹果
document.execCommand('Copy');
this.$refs.clipboard.focus();
this.$refs.clipboard.select(); // 安卓
this.$refs.clipboard.setSelectionRange(0, this.$refs.clipboard.value.length); // 苹果
document.execCommand('Copy');
本文标题:JS复制到剪贴板
本文链接:https://www.haomeiwen.com/subject/elyknhtx.html
网友评论