41

9行代码实现复制内容至剪切板

 6 years ago
source link: https://juejin.im/post/5ae1d75f6fb9a07aab298faf
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Demo: ma125120.github.io/ma-animate/… 本方法主要使用了 Range 对象和HTML5的Selection API,经过测试,本方法在主流浏览器如谷歌浏览器、火狐浏览器、360安全浏览器、搜狗高速浏览器中均运行良好。 先附

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK