<script>
//获取复制区域id
var oContent =document.getElementById('txtbox');
oContent.onmouseup = function(){
alert(selectText());
};  
function selectText(){
if(document.Selection){       
//ie浏览器
return document.selection.createRange().text;     	 
}else{    
//标准浏览器
return window.getSelection().toString();	 
}	 
}	
var oContent =document.getElementById('txtbox');
oContent.onmouseup = function(){
document.execCommand("Copy");	
};  
</script>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-08-20
  • 2021-10-31
  • 1970-01-01
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
相关资源
相似解决方案