1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键
3kp+<$ <table border oncontextmenu=return(false)><td>no</table> 可用于Table
XrGglBIV 8\A#CQ5b 2. <body onselectstart="return false"> 取消选取、防止复制
sLT3Y}IO O:{~urV 3. onpaste="return false" 不准粘贴
rlSeu5X6 <
!C)x 4. oncopy="return false;" oncut="return false;" 防止复制
C{xaENp e)?
.r9pA; 5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址栏前换成自己的图标
?Z[[2\DR
=ncVnW{ 6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夹中显示出你的图标
#r~# I}U YWO)HsjP 7. <input style="ime-mode:-Disabled"> 关闭输入法
9W1YW9rL ag;pN*z 8. 永远都会带着框架
~/iKh11 <script language="javascript"><!--
6wjw ^m0 if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页
[uN?
~lp\% // --></script>
2E)-M9ds 9ZsVy 9. 防止被人frame
,K"U>& <SCRIPT LANGUAGE=javascript><!--
W/bQd)Jvk if (top.location != self.location)top.location=self.location;
~1AgD-:Jz // --></SCRIPT>
U@)eTHv}6 V1`o%;j 10. 网页将不能被另存为
RmeD$>7 <noscript><iframe src=*.html></iframe></noscript>
yfjWbW k1Y ? 11. <input type=button value=查看网页源代码
,pQZ@I\z onclick="window.location = `view-source:`+
http://www.51js.com/`";>
t:
;Pj9 ;rGwc$?| 12.删除时确认
' ;FnIZ <a href=`javascript:if(confirm("确实要删除吗?"location="boos.asp?&areyou=删除&page=1"`>删
'9Xu
p pG^ 除</a>
-4IE]'## ND#Yenye 13. 取得控件的绝对位置
SaAFz&WRl //javascript
Q}K"24`= <script language="javascript">
m{cGK`/\ function getIE(E){
CMG&7(MR var t=e.offsetTop;
}Gm>`cw- var l=e.offsetLeft;
7p16Hv7y~ while(e=e.offsetParent){
L;NvcUFn t+=e.offsetTop;
U!?_W=? l+=e.offsetLeft;
;oKZ!ND }
Sc1 8dC0 alert("top="+t+"/nleft="+l);
8hz^%vm }
*-=(Q`3 </script>
Y^;ovH~ ve m_?~OL S //VBScript
%G/hD <script language="VBScript"><!--
/hH function getIE()
CR`Q#Yi dim t,l,a,b
$m{:C;UH set a=document.all.img1
M2>Vj/ t=document.all.img1.offsetTop
+yH7v5W l=document.all.img1.offsetLeft
Ms5ap<q# while a.tagName<>"BODY"
~"&|W'he[ set a = a.offsetParent
HU8900k+ t=t+a.offsetTop
$=8
NED5 l=l+a.offsetLeft
j@U]'5EVB wend
L~rBAIdD msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
HV!m8k=6 end function
y^,1a[U. --></script>
k"T}2 7 FxtQXu-g 14. 光标是停在文本框文字的最后
DJXmGt] <script language="javascript">
3G)#5Lf< function cc()
\378rQU {
+`7i'ff var e = event.srcElement;
~ Ei $nV var r =e.createTextRange();
,]ma+(| r.moveStart(`character`,e.value.length);
'EEJU/"u r.collapse(true);
"$Z= %.3Q r.select();
7$vYo
_ }
hOu3 bA </script>
1R{!]uh <input type=text name=text1 value="123" onfocus="cc()">
z0p*Z& hk(ZM#Bh 15. 判断上一页的来源
&Fzb6/ javascript:
6S'yZQ|b document.referrer
?wiCQ6*$ b8`)y<