标签:and exe 兼容 plain cti doc chrome href def
本文摘自:https://zhuanlan.zhihu.com/p/38052227
function setClipBoardData(text) {
var copy = function (e) {
e.preventDefault();
if (e.clipboardData) {
e.clipboardData.setData(‘text/plain‘, text);
} else if (window.clipboardData) {
window.clipboardData.setData(‘Text‘, text);
}
}
window.addEventListener(‘copy‘, copy);
document.execCommand(‘copy‘);
window.removeEventListener(‘copy‘, copy);
}
标签:and exe 兼容 plain cti doc chrome href def
原文地址:https://www.cnblogs.com/lroy/p/12826512.html