js 监听crtl c 输出选中内容

仅限ie意外浏览器

document.onkeydown=function(){  if(event.ctrlKey && event.keyCode==67){var text= window.getSelection?window.getSelection():document.selection.createRange().text;console.log(window.getSelection().toString());
  }}

原文地址:https://www.cnblogs.com/yeyuqian/p/14464152.html