一些页面保护措施
2005-01-12 10:05
253 查看
<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.
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>
2.禁止复制
<body onselectstart="return false"; onpaste="return false";>
3.输入框内禁止选择,禁止粘贴
<input size=30>
<!--onselectstart禁止选择 onpaste禁止粘贴-->
<!--
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.
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>
2.禁止复制
<body onselectstart="return false"; onpaste="return false";>
3.输入框内禁止选择,禁止粘贴
<input size=30>
<!--onselectstart禁止选择 onpaste禁止粘贴-->
相关文章推荐
- 关于数组越界的一些保护措施
- 保护数据的一些措施
- 关于android防止反编译的保护措施——混淆编译
- .NET DLL 保护措施详解(二)关于性能的测试
- 总结移动端页面开发时需要注意的一些问题
- 本人的开发中的一些笔记(一)js判断页面中多个checkbox是否至少被选中一个
- web页面的一些使用技巧
- 保护手机号码不被应用窃取的有力措施
- 15.odoo入门——工作遇到的odoo的一些细节和javascript实现数据库操作后跳转页面
- Struts点滴:页面保护
- 页面长度与用户行为的一些数据
- 在原来pc页面的基础上修改成移动端的一些 4000 心得
- Discuz!教程之Discuz!X2.5版本安装一些插件显示500错误,或页面打不开的问题修复
- C++友元friend --c++利用friend修饰符,可以让一些你设定的函数能够对这些保护数据进行操作
- Yii的一些安全防范措施
- 避免全局变量污染的一些措施!
- 页面上常用的一些小功能--QQ、回到顶部
- js 注册页面的一些检验(身份证,手机号码,固定电话等等)
- wml页面的一些设计经验
- 使用session保护受限页面