- 主题
- 回帖
- 0
- 学费
- 元
- 登陆
- 次
- 精华
- 威望
- 点
- 原创
- 帖
- 解答
- 次
- 注册时间
- 2007-1-31
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
方法一:
<SCRIPT language=javascript>
function click() {
if (event.button==2) { //改成button==1为禁止左键
alert('版权所有,请勿复制!!')
}
}
document.onmousedown=click
</SCRIPT>
方法二:
<body oncontextmenu=self.event.returnValue=false>
方法三:
单击鼠标右键看看吧
<STYLE>
v\:*{behavior:url(#default#VML);}
</STYLE>
</HEAD>
<BODY oncontextmenu="return false">
<SCRIPT>
function document.onmousedown(){
if(document.readyState=="complete"&&event.button==2&&document.all.tags("OVAL").length<5&&event.x<window.document.body.offsetWidth-100&&event.y<window.document.body.offsetHeight-100&&event.srcElement.tagName!="INPUT"){
color1="rgb("+Math.round(Math.random() * 255)+","+Math.round(Math.random() * 255)+","+Math.round(Math.random() * 255)+")"
newvml="<v:oval strokecolor='"+color1+"' fillcolor='"+color1+"' style='filter:alpha(opacity=20);width:10;height:10;position:absolute;left:"+(event.x+document.body.scrollLeft)+";top:"+(event.y+document.body.scrollTop)+";'/>"
document.body.insertAdjacentHTML("beforeEnd",newvml)
setTimeout("changoval()",10)
}}
function changoval(){
thelen=document.all.tags("OVAL").length
for(i=0;i<thelen;i++){ try{
var theobj=document.all.tags("OVAL")[i]
str1=parseInt(theobj.style.width)+1;
theobj.style.width=str1;
theobj.style.height=str1;
if(str1>200)theobj.removeNode()
}catch(e){}
}
if(thelen==0)clearTimeout(time1)
time1=setTimeout("changoval()",10)
}
</SCRIPT> |
|