如何设置禁止复制页面
用JAVA禁止复制网页内容
function key(){
//if( iftKey){
// ose();}
//禁止shift
if( tKey){
alert('禁止CTRL-C复制本贴内容');}
//禁止alt
if(event。 ctrlKey){
alert('禁止CTRL-C复制本贴内容');}
//禁止ctrl
return false;}
document。onkeydown=key;
if (window。 Event)
ptureEvents(Event。MOUSEUP);
//swordmaple javascript article。
//from
//fu...全部
用JAVA禁止复制网页内容
function key(){
//if( iftKey){
// ose();}
//禁止shift
if( tKey){
alert('禁止CTRL-C复制本贴内容');}
//禁止alt
if(event。
ctrlKey){
alert('禁止CTRL-C复制本贴内容');}
//禁止ctrl
return false;}
document。onkeydown=key;
if (window。
Event)
ptureEvents(Event。MOUSEUP);
//swordmaple javascript article。
//from
//function nocontextmenu(){
// ncelBubble = true
// turnValue = 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){
ncelBubble = true
turnValue = false;
return false;}
}
function Click(){
alert('禁止右键粘贴本贴内容');
turnValue=false;
}
document。
oncontextmenu=Click;
一个更简单的方法就是在中加入如下的代码,这样鼠标的左右键都失效了。
topmargin="0" oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect=" lection。
empty()" oncopy=" lection。empty()" onbeforecopy="return false" onmouseup=" lection。empty()"
1.禁止网页另存为:在后面加入以下代码:
2.禁止网页内容复制.粘贴:在中加入以下代码:
这两种方法,试试看
。
收起