这个10版本和11版本不一样了,参考
10版本禁止复制,报表加载结束事件,决策报表初始化事件
function disableselect(e){
return false}
function reEnable(){return true
}
file://if IE4+
document.onselectstart=new Function ("return false")
file://if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
function nocontextmenu(event){
event = event || window.event;
if (event.which == 2 )
event.returnValue = false;
return false;
}
document.oncontextmenu = nocontextmenu;
11版本禁止复制
document.addEventListener('copy',(e)=>{
e.preventDefault();//禁用复制
// console.log(e.target);复制的是哪个标签段落
e.clipboardData.setData('text/plain','不准复制');
})