即使不用右键,也可以同过IE的“查看”->“源文件”。
怎么禁用IE的部分菜单?
怎么禁用IE的部分菜单?
解决方案 »
- 把本地的程序,上传到服务器,怎么会产生bom代码??
- koobi 7 的解密 -- byterun protector for PHP 类加密编码的研究
- 100分求教php 如何连接odbc数据源??...................................
- 一个BUG,请教高手解决!
- 推荐几本好书
- 小弟新搞的一个购物商城,大家多提意见吧
- 关于PHP4升级到php5出现的问题 (请大家帮帮忙啊)
- 谁有一个简单的网站统计代码,主要也就是总的浏览人数,今天的浏览人数之类的数据。
- 请交:谁手头有验证输入内容是否为数字的JS FUNCTION
- 按时间搜索数据的问题
- 怎么样取得当前所在的绝对目录?谢谢!!
- 提示:Warning: Undefined variable: grade in D:\flashlong\flash\admin\config.php on line 104
至于ie->查看->源文件,干脆把菜单去掉,这样连另寸为都没有了!
这样不用禁右键,别人也较难找出你的源码..
function clickButton(){
if(event.button!=1) alert(".....");
}
document.onmousedown=clickButton;
</script>
现在哪个还是ie5以下的啊,如果是,他也土不会去看源代码了,
function click()
{
if (event.button==2) {alert('欢迎访问') }
}
document.onmousedown=click
</SCRIPT>
我大不了不用ie来看,我用flashget来down!不过这个文章问的是怎么真正实现 禁用鼠标右键
你隐藏得了吗??我去telnet你的80端口
只接拿页面代码来看,你能怎么防我?有时间去考虑一下其他的东西
比在这个上面浪费时间好。
我把你想要的都想到了,试试吧。<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><noscript>
<meta http-equiv="refresh" content="0;url=about:noscript">
</noscript><title>屏蔽鼠标右键、Ctrl+n、shift+F10、F5刷新、退格键</title>
</head>
<body onkeydown="KeyDown()" onbeforeunload="location=location"
oncontextmenu="event.returnValue=false"><script language="Javascript"><!--
//屏蔽鼠标右键、Ctrl+n、shift+F10、F5刷新、退格键
//Author: meizz(梅花雨) 2002-6-18function KeyDown(){
if ((window.event.altKey)&&
((window.event.keyCode==37)|| //屏蔽 Alt+ 方向键 ←
(window.event.keyCode==39))){ //屏蔽 Alt+ 方向键 →
alert("不准你使用ALT+方向键前进或后退网页!");
event.returnValue=false;
} /* 注:这还不是真正地屏蔽 Alt+ 方向键,
因为 Alt+ 方向键弹出警告框时,按住 Alt 键不放,
用鼠标点掉警告框,这种屏蔽方法就失效了。以后若
有哪位高手有真正屏蔽 Alt 键的方法,请告知。*/ if ((event.keyCode==8)|| //屏蔽退格删除键
(event.keyCode==116)){ //屏蔽 F5 刷新键
event.keyCode=0;
event.returnValue=false;
}
if ((event.ctrlKey)&&(event.keyCode==78)){ //屏蔽 Ctrl+n
event.returnValue=false;
}
if ((event.shiftKey)&&(event.keyCode==121)){ //屏蔽 shift+F10
event.returnValue=false;
}
}
/* 另外可以用 window.open 的方法屏蔽 IE 的所有菜单
第一种方法:
window.open("你的.htm", "","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=yes,status=no,top=0,left=0")
第二种方法是打开一个全屏的页面:
window.open("你的.asp", "", "fullscreen=yes")
*/
// --></script>
<h2 align=center>屏蔽鼠标右键、Ctrl+n、shift+F10、F5刷新、退格键</h2>
</body>
</html>
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
//-->
</script>