禁止页面刷新 不好意思,标题写错了应该是 禁止查看页面代码,但是允许使用TextBox的右键功能,请问怎么实现 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果是.net的话,把页面的代码全写到后台输出到页面,js代码做成js文件引用, //方法一在 <body>与</body>之间加入:<script language="javascript">function click() {if (event.button==2) { alert('去,不准偷看。')}}document.onmousedown=click</script>或 <script language="javascript"> document.oncontextmenu=stop </script>//方法二oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' onmouseup='document.selection.empty()'//jsp中禁用鼠标右键,禁止复制粘贴,双击鼠标滚动屏幕的代码onmouseup=document.selection.empty() oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false"onselectstart="return false" oncut="return false;" oncopy="return false;"leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"oncopy=document.selection.empty() leftMargin=0 topMargin=0 onselect=document.selection.empty() 学习jquery遇到的问题 用JS实现多样化的超链接提示效果 问jquery live函数的js表现形式。。 if(document.all) 如何取出数学表达式中的一部分? javascript高手请进,解决马上就送分 如何获得在类中,获得对象名称? 实在想不通 请教这6行代码输出为什么是这样 如何设置字体居中上下滚动? ?user_id=XXX问题! jquery级联问题 急哦!这个号分数多 呵呵 50RMB 请人帮我取得一个js生成的连接
在 <body>与</body>之间加入:
<script language="javascript">
function click() {
if (event.button==2) {
alert('去,不准偷看。')
}
}
document.onmousedown=click
</script>
或
<script language="javascript">
document.oncontextmenu=stop
</script>
//方法二
oncontextmenu='return false'
ondragstart='return false'
onselectstart ='return false'
onselect='document.selection.empty()' oncopy='document.selection.empty()'
onbeforecopy='return false'
onmouseup='document.selection.empty()'
//jsp中禁用鼠标右键,禁止复制粘贴,双击鼠标滚动屏幕的代码
onmouseup=document.selection.empty()
oncontextmenu="return false"
onselectstart="return false"
ondragstart="return false"
onbeforecopy="return false"
onselectstart="return false" oncut="return false;" oncopy="return false;"
leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"
oncopy=document.selection.empty()
leftMargin=0
topMargin=0
onselect=document.selection.empty()