只要在BODY里加上
<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
它的鼠标就被封锁
左右键都没有用了
至于在工具栏里也看不到代码
那就要代码转换工具了
还有你可以把你的代码做成单独的文件
再在你的网页里调用程序
不就看不到了么
<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
它的鼠标就被封锁
左右键都没有用了
至于在工具栏里也看不到代码
那就要代码转换工具了
还有你可以把你的代码做成单独的文件
再在你的网页里调用程序
不就看不到了么
只能对付对付门外汉罢了。
要不MSN、MS的网站早就把代码封死了!
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 function loadpage(URL) {
newWin = window.open(URL, 'Article', 'resizable=yes, menubar=yes,scrollbars=yes, toolbar=no, location=no, width=650, height=450');
newWin.focus();
}
</SCRIPT>