您当前所在的位置:首页>>设计教程>>网页设计>>正文 文章正文
屏蔽鼠标右键、取消选取、防止复制、网页将不能被另存为
作者:  点击数:

1.  oncontextmenu="window.event.returnvalue=false"      将彻底屏蔽鼠标右键    <table border oncontextmenu=return(false)><td>no</table>   可用于Table

2.  <body>                 取消选取、防止复制

3.  onpaste="return false"                                        不准粘贴

4.  oncopy="return false;" oncut="return false;"                  防止复制

5.  <link rel="Shortcut Icon" href="favicon.ico"> IE地址栏前换成自己的图标

6.  <link rel="Bookmark" href="favicon.ico">  可以在收藏夹中显示出你的图标

7.  <input style="ime-mode:disabled">                           关闭输入法

8.  永远都会带着框架&lt;&#83cript language="javascript"&gt;&lt;--<br&gt;  if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页// --&gt;&lt;/&#83cript&gt;

9.  防止被人frame&lt;&#83cript LANGUAGE=javascript&gt;&lt;-- <br&gt;  if (top.location != self.location)top.location=self.location;// --&gt;&lt;/&#83cript&gt;

10. <noscript><iframe src=*.html></iframe></noscript>     网页将不能被另存为

11. <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">

12. 怎样通过asp的手段来检查来访者是否用了代理<% if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" thenresponse.write "<font color=#FF0000>您通过了代理服务器,"& _"真实的IP为"&Request.ServerVariables("HTTP_X_FORWARDED_FOR")end if%>

13. 取得控件的绝对位置//javascript&lt;&#83cript language="javascript"&gt;function getIE(e){  var t=e.offsetTop;  var l=e.offsetLeft;  while(e=e.offsetParent){    t+=e.offsetTop;    l+=e.offsetLeft;    }  alert("top="+t+"\nleft="+l);  }&lt;/&#83cript&gt;//VBScript&lt;&#83cript language="VBScript"&gt;&lt;--<br&gt;function getIE()  dim t,l,a,b  set a=document.all.img1  t=document.all.img1.offsetTop  l=document.all.img1.offsetLeft  while a.tagName<>"BODY"    set a = a.offsetParent    t=t+a.offsetTop    l=l+a.offsetLeft  wend  msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"end function--&gt;&lt;/&#83cript&gt;

14. 光标是停在文本框文字的最后&lt;&#83cript language="javascript"&gt;function cc(){  var e = event.srcElement;  var r =e.createTextRange();  r.moveStart('character',e.value.length);  r.collapse(true);  r.select();}&lt;/&#83cript&gt;<input type=text name=text1 value="123" onfocus="cc()">

本新闻共3页,当前在第1页  1  2  3  

相 关 搜 索
今 日 头 条
 
最 新 热 门
最 新 推 荐
 
文章来源:   更新时间:2006-9-17 10:05:53  责任编辑:
  上一篇文章:没有了
下一篇文章:网页不能“另存为”?
相关文章
网页不能“另存为”?
怎么解除(网页不能另存为)的问