禁止选择文本和禁用右键 v3.0】的更多相关文章

禁止选中字体(注:在火狐浏览器没有起到效果作用) <script> function disableselect(e) { var omitformtags = ["input", "textarea", "select"]; omitformtags = omitformtags.join("|"); if (omitformtags.indexOf(e.target.tagName.toLowerCase())…
var zhonghao={ //绑定事件 myAddEvent: function(obj, sEvent, fn){if(obj.attachEvent){obj.attachEvent('on'+sEvent, fn);}else{obj.addEventListener(sEvent, fn, false);}}, //禁止选择文本 disableselect:function(e){ var omitformtags=["input", "textarea"…
禁止鼠标右键(注:在火狐浏览器没有起到效果作用) <script> function stop() { return false }; document.oncontextmenu = stop; javascript: ; </script>…
代码如下: function click(e) { if (document.all) { ||||) { oncontextmenu='return false'; } } if (document.layers) { ) { oncontextmenu='return false'; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; docum…
<body leftmargin=0 topmargin=0 oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' onmouseup='document.selection.e…
HTML页面内容禁止选择.复制.右键刚在一个看一个站点的源代码的的时候发现的,其实原来真的很简单 <body leftmargin=0 topmargin=0 oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforeco…
oncontextmenu="window.event.returnValue=false" style="overflow-y: hidden; overflow-x: hidden"ajs9     leftmargin="0" topmargin="0"<body oncontextmenu="return false"></body><!--禁止网页另存为: -->…
本文章介绍的jquery禁用右键.文本选择功能.复制按键的实现它可以兼容浏览器有IE.firefox.谷歌浏览器,各位朋友可参考.IE浏览器是指以IE为核心的浏览器也支持,有360,QQ等 代码如下: //禁用右键.文本选择功能.复制按键 $(document).bind("contextmenu",function(){return false;}); $(document).bind("selectstart",function(){return false;}…
同时适合IE.firefox.谷歌浏览器下适用,经过筛选代码如下 //禁用右键.文本选择功能.复制按键 $(document).bind(“contextmenu”,function(){return false;}); $(document).bind(“selectstart”,function(){return false;}); $(document).keydown(function(){return key(arguments[0])}); //按键时提示警告 function ke…
//禁用右键.文本选择功能.刷新 $(document).bind(“contextmenu”,function(){return false;}); $(document).bind(“selectstart”,function(){return false;}); $(document).keydown(function(){])}); //按键时提示警告 function key(e){ var keynum; if(window.event){ keynum = e.keyCode; /…