<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language=javascript>
 function setCookie(cookieName, cookieValue, expires, path, domain, secure) 
  {
document.cookie =
escape(cookieName) + '=' + escape(cookieValue)
+ (expires ? '; expires=' + expires.toGMTString() : '')
+ (path ? '; path=' + path : '')
+ (domain ? '; domain=' + domain : '')
+ (secure ? '; secure' : '');
};function getCookie(cookieName) 
{
var cookieValue = '';
var posName = document.cookie.indexOf(escape(cookieName) + '=');
if (posName != -1) 
{
var posValue = posName + (escape(cookieName) + '=').length;
var endPos = document.cookie.indexOf(';', posValue);
if (endPos != -1) 
{
cookieValue = unescape(document.cookie.substring(posValue, endPos));
}
else 
{
cookieValue = unescape(document.cookie.substring(posValue));
}
}
return (cookieValue);
};
 function  clearCookie() 
{
var now = new Date();
var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
this.setCookie('wuxin', '', yesterday);
};// [Cookie] Returns ids of open nodes as a string</script>
<SCRIPT FOR=window EVENT=close>
clearCookie();
</SCRIPT>
<SCRIPT FOR=window EVENT=onload >
if(getCookie("wuxin")=="visited"){
leftmenu.location="index.htm";
}
else{
this.setCookie('wuxin', 'visited');
document.oncontextmenu=stop;
    document.onselectstart =stop
    document.onselect='document.selection.empty()'
    document.oncopy='document.selection.empty()'
}
</SCRIPT>
</HEAD><BODY></BODY>
</HTML>

解决方案 »

  1.   

    一禁用javascript全玩完,可以查看源代码复制内容。禁止复制,只是一种欺骗不懂技术的人
      

  2.   

    如果cookie就这一个可以这么写adasfasdfasdf<input type="button" value="清除cookie" onclick="document.cookie=null"><script language="javascript">
    alert("cookie=" + document.cookie)
    var vFlag=true;
    window.onload=function(){
    if(document.cookie != "visited"){
    vFlag=false;
    document.cookie="visited";
    }
    }function EditCheck(){
    event.returnValue=vFlag;
    }document.onselectstart = EditCheck;
    document.oncontextmenu = EditCheck;
    document.oncopy = EditCheck;</script>
      

  3.   

    URL全部用JS来处理,如果visited就用模态窗口打开目标,这样应该没问题了吧?嘿嘿
      

  4.   

    leohuang,你的代码在cookie被写入了visited之后,页面仍然不能被复制。
      

  5.   

    不能复制不就对了嘛你改一下vFlag的值true改成false,两个一块变,就是反过来的效果
      

  6.   

    现在就是这样的效果...............你点"清除cookie",现在cookie不是visited了
    然后重新打开,这时候不能复制,写入visited关了再重新打开就可以复制了
      

  7.   

    你应该用window.open把工具条去掉
    然后在用
    我给你发的方法不能用吗?