1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键
wRbw <table border oncontextmenu=return(false)><td>no</table> 可用于Table
0xP:9rm \R Z3Hh 2. <body onselectstart="return false"> 取消选取、防止复制
y4<+- pt})JMm 3. onpaste="return false" 不准粘贴
,y.3Fe F6&P ~H 4. oncopy="return false;" oncut="return false;" 防止复制
p7 [(z
(j N]OE^ 5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址栏前换成自己的图标
Wem?{kx0 3+ asP&n 6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夹中显示出你的图标
{3 o%d: /0\QL+^! 7. <input style="ime-mode:-Disabled"> 关闭输入法
HD00J]y_ 4*8&[b 8. 永远都会带着框架
dq1TRFu <script language="javascript"><!--
j+0.=#{?? if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页
,%8$D-4#_ // --></script>
x]'H jTqX A$m<@%Sz 9. 防止被人frame
m/?h2McS <SCRIPT LANGUAGE=javascript><!--
~XQ$aRl& if (top.location != self.location)top.location=self.location;
NcM3P G // --></SCRIPT>
LUul7y'"
FV8\+ep 10. 网页将不能被另存为
,;3:pr <noscript><iframe src=*.html></iframe></noscript>
BhkAQEsWTQ Iaa|qJ4 11. <input type=button value=查看网页源代码
Wa, 7P2r onclick="window.location = `view-source:`+
http://www.51js.com/`";>
BHclUwj RAOKZ~` 12.删除时确认
lk o3]A3 <a href=`javascript:if(confirm("确实要删除吗?"location="boos.asp?&areyou=删除&page=1"`>删
ULu O0\W 8bGD 除</a>
c}cG<F %&1$~m0 13. 取得控件的绝对位置
E7LbSZ //javascript
hg&u0AQ2 <script language="javascript">
hXnw..0" function getIE(E){
gix>DHq$k var t=e.offsetTop;
Xj;2h{#s var l=e.offsetLeft;
+gNX7xuY while(e=e.offsetParent){
)|:8zDuJ t+=e.offsetTop;
@?M;'xMbB l+=e.offsetLeft;
40+fGRyOL }
2%]t3\XW alert("top="+t+"/nleft="+l);
Xv&%2-V; }
pLo;#e8'f </script>
m9I(TOw tnJ`D4 //VBScript
N.vG]%1" <script language="VBScript"><!--
d3(+ztmG! function getIE()
2{gwY85: dim t,l,a,b
2D_6 set a=document.all.img1
D:6N9POB t=document.all.img1.offsetTop
C\/b~HU l=document.all.img1.offsetLeft
m&ZJqsZIL while a.tagName<>"BODY"
R/rcXX7% set a = a.offsetParent
9Q=>MOB- t=t+a.offsetTop
^T+<!k l=l+a.offsetLeft
1sMV`qv> wend
!,R msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
8z0Hx end function
/t5g"n3 --></script>
9?!u2 o F*.
/D~K 14. 光标是停在文本框文字的最后
\CDAFu# <script language="javascript">
P 4H*jy@? function cc()
`43vxcMg {
9Mnem* var e = event.srcElement;
CP@o,v- var r =e.createTextRange();
bsMC#xT r.moveStart(`character`,e.value.length);
|&(H^<+Xp r.collapse(true);
o KlF5I r.select();
Qw}xGlF, }
ko>M&/^ </script>
pj j}K <input type=text name=text1 value="123" onfocus="cc()">
O/nqNQ?< |<'10 15. 判断上一页的来源
C~:b* X javascript:
7Z
VVR*n| document.referrer
[(!Q-8 XCV0.u| 16. 最小化、最大化、关闭窗口
z3ZuC{ <object id=hh1 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
L2k;f] <param name="Command" value="Minimize"></object>
{ .cB>L <object id=hh2 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
>*Sv0# <param name="Command" value="Maximize"></object>
)'w]YIv9 <OBJECT id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
Fr<Pe&d