62,271
社区成员
发帖
与我相关
我的任务
分享/*
* 説明:Client危険な操作を禁止する
*/
function forbidUserDo()
{
//RightMouseを禁止
$(document).bind("contextmenu",function(e){
return false;
});
$(document).bind("ondragstart",function(e){
return false;
});
$(document).bind("onselectstart",function(e){
return false;
});
$(document).bind("onselect",function(e){
document.selection.empty();
return false;
});
$(document).bind("oncopy",function(e){
document.selection.empty();
});
$(document).bind("onbeforecopy",function(e){
return false;
});
$(document).bind("onmouseup",function(e){
document.selection.empty();
});
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height)
//ボタン「back」を禁止する
window.history.forward(1);
}
forbidUserDo();
function KeyDown(e) {
if ( event.button == 0) { //屏蔽 鼠标右键
return false;
}
}
document.oncontextmenu = KeyDown;
document.onkeydown = function() { KeyDown() };