5D艺术网首页
商城
|
资讯
|
作品
|
博客
|
教程
|
论坛
登录
注册
加为好友
发短消息
来自:
性别:秘密
最后登录:2009-03-18
http://jybbh.5d.cn/
首页
|
新闻
|
话题
|
博客
|
相册
|
艺术作品
|
社交关系
|
留言板
|
社交圈
2005/05/23 | 禁止右键、选择、粘贴、shift、ctrl、alt.....
类别(WEB相关)
|
评论
(0)
|
阅读(50)
|
发表于 10:12
<script language="javascript">
<!--
function key(){
if(event.shiftKey){
window.close();}
//禁止shift
if(event.altKey){
window.close();}
//禁止alt
if(event.ctrlKey){
window.close();}
//禁止ctrl
return false;}
document.onkeydown=key;
if (window.Event)
document.captureEvents(Event.MOUSEUP);
//swordmaple javascript article.
//from
www.jx165.com
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>
<body onselectstart="return false"; onpaste="return false";>
选择字符试试1010110
<input size=30>
<!--onselectstart禁止选择 onpaste禁止粘贴-->
引用地址:http://www.tongyi.net/article/20050228/200502284204.shtml
0
评论
Comments
日志分类
首页
[252]
Ken的日志
[63]
工作心得
[3]
编程相关
[28]
潮汕文化
[4]
计算机相关
[28]
WEB相关
[84]
JAVA相关
[20]
Eclipse相关
[7]
Tomcat相关
[1]
SQL
[14]