js禁止右击,禁止浏览器菜单
2015-01-29 Js 1534
function click() {
return false; }
function click1() {
if (event.button==2) { return false; }}
function CtrlKeyDown(){
if (event.ctrlKey) { return false; }}
document.onkeydown=CtrlKeyDown;
docum
function click() {
return false; }
function click1() {
if (event.button==2) { return false; }}
function CtrlKeyDown(){
if (event.ctrlKey) { return false; }}
document.onkeydown=CtrlKeyDown;
document.onselectstart=click;
document.onmousedown=click1;
document.oncontextmenu=function(event) {
if (document.all)
window.event.returnValue = false;// for IE
else
event.preventDefault();
}
很赞哦! (0)
文章评论
-
-
-
0条评论