<BODY oncontextmenu="return false" oncut="return false" oncopy="return false">
解决方案 »
- php正则表达式获取div标签中的a标签href问题
- 一个mysql数据库的问题,望高手解答
- PHP 调外部命令问题
- 急求:如何统计会员登陆次数。
- =========关于树形论坛的时间复杂度=========
- 初学PHP请教一个问题,在线等!
- asp中的探针,在php里怎么用?request.servervariables("remote_addr"),request.servervariables("HTTP_REFERER")在php里是什么?
- PHP 4.3.4RC1 released
- 为什么不能够在本地创建数据库?
- 如何让数组中多个成员,匹配MYSQL单字段里的一篇文章。
- 将两个字符串连接起来的函数?是哪个??
- auto.inc放到哪里?呢
这个不行啊,能用enablepightclick解开啊
这个也不行啊,各位大侠帮帮忙啊
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
document.onmousedown=click
function keydown()
{if(event.ctrlKey ==true || event.keyCode ==93 || event.shiftKey ==true){return false;} }
document.onkeydown =keydown
</script>
<SCRIPT LANGUAGE="JavaScript">
document.onkeydown = function() {
if(event.keyCode==116) {
event.keyCode=0;
event.returnValue = false;
}
}
document.oncontextmenu = function() {event.returnValue = false;}
</SCRIPT>
写上就好了
这是个什么东西?
就看到他丰右键的源码了
<body leftmargin="50" topmargin="0"oncontextmenu="return false" onselectstart="return false">
oncontextmenu="return false" onselectstart="return false"
而且还少了空格,~~:)
2.看它的源码,注意不要漏掉.js的文件
<!--
window.open('http://www.pikou.net/bbs');
//-->
</SCRIPT>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
=========================================================
版权所有 皮口设计 (http://www.pikou.com)
设计论坛 皮口bbs (http://www.pikou.net)网页设计制作 hui
=========================================================
--><html>
<head>
<title>[推荐]皮口设计-大连设计站点</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="皮口设计 设计论坛 涂鸦板 皮口设计 网页设计 平面设计 设计素材"> <meta http-equiv=Content-Type content="text-html; charset=gb2312">
<meta name="DEscription" content="“皮口设计”是皮口设计工作室(http://www.pikou.com)的原创设计类网站">
<meta name="Author" contect="HUI"> <link href="img/hui.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script> <style type="text/css"><!--
-->
</style>
</head>
谢谢你,原代码我也找得到,我就是找不出他封右键的代码所在,<body>里面加条件我也懂,但我加的都能被解开,我要的是解不开的封右键的方法,谁能帮帮我啊
搞不懂楼主再做什么??
答案告诉了千万遍,但楼主还是说:
cpio(就这么简单) 谢谢你,但这样不行啊,能解开啊
能解开是什么意思???
楼主是哪国人,我怎么听不懂你说的话???
你可以注意一下他的<body leftmargin="50" topmargin="0"oncontextmenu="return false" onselectstart="return false">
里的topmargin="0"oncontextmenu="return false"是连在一起的.不知道是不是这个原因.如果不是我就想不出来还有什么了.
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</script>
把下面代码保佑为'test.htm'就可以了,单击右键你可以右键弹出式菜单
test.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>自定义鼠标右键弹出式菜单</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>.div1 {
BORDER-RIGHT: windowframe 1px solid; BORDER-TOP: buttonface 1px solid; BORDER-LEFT: buttonface 1px solid; BORDER-BOTTOM: windowframe 1px solid
}
.div2 {
BORDER-RIGHT: buttonshadow 1px solid; BORDER-TOP: window 1px solid; BORDER-LEFT: window 1px solid; BORDER-BOTTOM: buttonshadow 1px solid
}
.MouseOver {
FONT-SIZE: 12px; CURSOR: hand; COLOR: highlighttext; BACKGROUND-COLOR: highlight
}
.MouseOut {
FONT-SIZE: 12px; CURSOR: default; COLOR: buttontext; BACKGROUND-COLOR: buttonface
}
</STYLE><SCRIPT language=javascript>
function PopupMouseRightButtonUpMenu()
{
if(MouseMenu.style.visibility=='visible') MouseMenu.style.visibility='hidden';
if (event.srcElement.tagName=='A' || event.srcElement.tagName=='TEXTAREA' || event.srcElement.tagName=='INPUT' || document.selection.type!='None')
return true;
else
{
if (event.clientX+150 > document.body.clientWidth) MouseMenu.style.left=event.clientX+document.body.scrollLeft-150;
else MouseMenu.style.left=event.clientX+document.body.scrollLeft;
if (event.clientY+DivH > document.body.clientHeight) MouseMenu.style.top=event.clientY+document.body.scrollTop-DivH;
else MouseMenu.style.top=event.clientY+document.body.scrollTop;
MouseMenu.style.visibility='visible';
}
return false;
}
function DrawMouseRightButtonUpMenu(){
DivH=2;
//oSelection = document.selection;
var HrStr='<tr><td align=\"center\" valign=\"middle\" height=\"2\"><TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"128\" height=\"2\"><tr><td height=\"1\" bgcolor=\"buttonshadow\"><\/td><\/tr><tr><td height=\"1\" bgcolor=\"buttonhighlight\"><\/td><\/tr><\/TABLE><\/td><\/tr>';
var MenuItemStr1='<tr><td align=\"center\" valign=\"middle\" height=\"20\"><TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"132\"><tr><td valign=\"middle\" height=\"16\" class=\"MouseOut\" onMouseOver=\"this.className=\'MouseOver\'\" onMouseOut=\"this.className=\'MouseOut\'\" onclick=\"'
var MenuItemStr2="<\/td><\/tr><\/TABLE><\/td><\/tr>";
var historyMenu=['window.history.back()\">后退','window.history.forward()\">前进'];
var SysMenu=['\">查找 <INPUT TYPE=\"text\" Size=\"10\" onkeypress=\"if (event.keyCode == 13) {MouseMenu.style.visibility=\'hidden\';var temp = this.value; this.value = \'\';return findInPage(temp)}\";\'>',
'document.execCommand(\'SelectAll\')\">全选',
'MouseMenu.style.visibility=\'hidden\';document.execCommand(\'SaveAs\',\'true\')\">另存为 ...',
'location.replace(\'view-source:\'+location.href)\">查看源文件',
'MouseMenu.style.visibility=\'hidden\';window.print()\">打印',
'window.location.reload()\">刷新'];var MenuStr='';
for(i=0;i<historyMenu.length;i++)
{
MenuStr+=MenuItemStr1+historyMenu[i]+MenuItemStr2;
DivH+=20;
}
MenuStr+=HrStr;
for(i=0;i<arguments.length;i++)
{
MenuStr+=MenuItemStr1+arguments[i]+MenuItemStr2;
DivH+=20;
}if(arguments.length>0)
{
MenuStr+=HrStr;
DivH+=2;
}for(i=0;i<SysMenu.length;i++)
{
MenuStr+=MenuItemStr1+SysMenu[i]+MenuItemStr2;
DivH+=20;
}var aboutMenu=['MouseMenu.style.visibility=\'hidden\';alert(\'http:\/\/www.playyuer.com\\nmailto:[email protected]\')">关于 ...']
MenuStr+=HrStr;
for(i=0;i<aboutMenu.length;i++)
{
MenuStr+=MenuItemStr1+aboutMenu[i]+MenuItemStr2;
DivH+=20;
}var MenuTop = '<DIV id=\"MouseMenu\" class=\"div1\" style=\"position:absolute; left:0px; top:0px; width=150;height='+DivH+'; z-index:1; visibility:hidden;\">\n' +
'<TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"div2\">\n' +
'<tr>\n' +
'<td bgcolor=\"' + MenuBarColor+ '\" width=\"50\" valign=\"bottom\" align=\"center\" bgcolor=\"buttonface\">\n' +
'<\/td>\n'+
'<td bgcolor=\"buttonface\">\n'+
'<TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\">';
var MenuBottom = '<\/TABLE><\/td><\/tr><\/TABLE><\/DIV>';
document.write(MenuTop+MenuStr+MenuBottom);
//prompt('aa',MenuTop+MenuStr+MenuBottom)
document.body.oncontextmenu=new Function('return PopupMouseRightButtonUpMenu();');
document.body.onclick=new Function('if(event.srcElement.tagName !=\'INPUT\') MouseMenu.style.visibility=\'hidden\'');
document.body.onscroll=new Function('MouseMenu.style.visibility=\'hidden\';');
document.body.onselectstart=new Function('MouseMenu.style.visibility=\'hidden\';');
window.onresizestart=new Function('MouseMenu.style.visibility=\'hidden\';');
}
var NS4 = (document.layers);
var IE4 = (document.all);
var win = window;
var n = 0;
function findInPage(str) {
var txt, i, found;
if (str == '')
return false;
if (NS4) {
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
if (n == 0)
alert('文档搜索完毕。');
}
if (IE4) {
txt = win.document.body.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart('character', 1);
txt.moveEnd('textedit');
}
if (found) {
txt.moveStart('character', -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
else {
if (n > 0) {
n = 0;
findInPage(str);
}
else
alert('文档搜索完毕。');
}
}
return false;
}
</SCRIPT><META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>自定义鼠标右键弹出式菜单
<SCRIPT language=JavaScript>
<!--
var MenuBarColor ='#6600FF';
DrawMouseRightButtonUpMenu();
//-->
</SCRIPT>
</BODY></HTML>
用javascript的话根本封不掉
提供的功能是解开使用CONTEXT MENU和JS封闭的右键,以及拖拉功能。
他的说明是 THE PLUGIN SHOULD WORK ON MOST FRAMED SITES.即是并非ALL SITES.
其中有些该插件不能解开的右键可能是他的支持问题,即使现在解不开,作者也会在以后的版本中支持,因为JS一定可以解开的。
除非不用JS,但是可能吗?