按F12看不了代碼 vue打包的html怎么樣禁止打開F12開發(fā)者工具呢?
vue打包的html怎么樣禁止打開F12開發(fā)者工具呢?不能完全禁止,但是下面的代碼可以在一定程度上阻止代碼調試。 document.onkeydown=函數(shù)(){變量e=window.event事件|
vue打包的html怎么樣禁止打開F12開發(fā)者工具呢?
不能完全禁止,但是下面的代碼可以在一定程度上阻止代碼調試。
document.onkeydown=函數(shù)(){
變量e=window.event事件||參數(shù)[0
]如果(e.keycode==123){
alert(”請尊重勞動成果!“)
return false
}否則if((e.ctrlkey)&&(e.shiftkey)&&(e.keycode==73)){
alert(”請尊重勞動成果!“)
return false
}否則if((e.ctrlkey)&(e.keycode==85)){
alert(”請尊重勞動成果!“)
return false
}否則if((e.ctrlkey)&(e.keycode==83)){
alert(”請尊重勞動成果!“”
返回false
}
}document.oncontextmenu=函數(shù)(){
提醒(“請尊重勞動成果!“”
返回false
}