JS 禁止IE用右键
来源:互联网 发布:linux ll命令语法 编辑:程序博客网 时间:2024/05/29 15:09
<!--组合键: -->
IE的键盘监听最多只能作用于document上(window我试过不行)
如果内嵌了iframe并且你的焦点在iframe上,那么按键无效
这里我用CTRL+Q写的例子:
function test(){
if(event.ctrlKey&&window.event.keyCode==81){
myalert();
}
}
<!--禁止网页右键: -->
document.body.oncontextmenu=function rightClick(){ window.event.returnValue= false;}
<!--禁止网页另存为: -->
<noscript><iframe src=*.html></iframe></noscript>
<!-- 禁止选择文本: -->
<script type="text/javascript">
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>
<!-- 禁用右键: -->
<script>
function stop(){
return false;
}
document.oncontextmenu=stop;
</script>
- JS 禁止IE用右键
- JS禁止右键禁止F5
- js禁止右键
- 禁止右键js
- js鼠标右键禁止
- js禁止右键
- 禁止右键及右键菜单js
- js禁止右键功能,禁止复制
- js 禁止鼠标右键事件
- JS实现禁止鼠标右键
- js防复制、禁止右键
- js禁止右键和f12
- js禁止页面刷新禁止用F5键刷新,禁止右键
- js 禁止内容选择 禁止打印 禁止右键弹出菜单
- 禁止右键,禁止选中,禁止网页复制的Js代码
- js禁止右键,禁止选取,禁止粘贴, 禁止复制,禁止剪贴
- JS禁止鼠标右键,弹出提示!
- js 禁止在网页上使用右键
- 阿里相关
- java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils错误异常
- Java中计算时间差
- java 字节流与字符流的区别
- 杂谈1 - 优秀网络工程师必备素质
- JS 禁止IE用右键
- fastjson(javabean命名)
- Sqlite 分页(http://www.cnblogs.com/shang53880/archive/2011/03/11/1981749.html)
- 在Ubuntu中使用终端删除应用程序
- 路由协议
- Java文件运用
- Timus 1078. Segments
- linux笔记(二)
- 大众点评的大数据实践——超级干货!