Qyouu
TA貢獻1518條經驗 獲得超10個贊
.js是一個很好的實用工具,它允許將文本或HTML數據復制到剪貼板,而無需使用Flash。它非常容易使用,只需包含.js并使用如下所示:
<script>????document.getElementById('markup-copy').addEventListener('click',?function()?{ ????????clipboard.copy({
????????????'text/plain':?'Markup?text.?Paste?me?into?a?rich?text?editor.', ????????????'text/html':?'here?is?some?rich?text'
????????}).then( ????????????function(){console.log('success');?},
????????????function(err){console.log('failure',?err); ????????});
????});</script>
js也在上。.
2016年1月15日編輯:頂答案曾.編輯今天在我的答復中引用了同樣的API,在2015年8月發布。之前的文本指示用戶使用。我只想說清楚手機html復制到剪貼板,我并沒有從的回答中摘取這個信息手機html復制到剪貼板,而是相反。
查看完整回答
反對2019-06-15