阿七 |
2006-04-03 17:04 |
HTML常用代码 W=?87PkJu OxZ:5ps 来自:http://blog.csdn.net/softj博客 7W"menw U4gJ![>5j 控制横向和纵向滚动条的显隐? S41>VbtEp <body style="overflow-y:hidden"> 去掉x轴 k 9rnT)YU <body style="overflow-x:hidden"> 去掉y轴 G.8b\E~ <body scroll="no">不显 S)yV51^B u#~!%~ *\", qMp H%]ch6C -------------------------------------------------------------------------------- tpONSR
Y 表格变色 fx:KH:q3 <TD onmouseover="this.style.backgroundColor='#FFFFFF'" ?`
i/ onmouseout="this.style.backgroundColor=''" b_yXM style="CURSOR: hand"> Z;D3lbqE -------------------------------------------------------------------------------- D|9fHMg% 禁止复制,鼠标拖动选取 "b4iOp&:= <body ondragstart=window.event.returnValue=false oncontextmenu=window.event.returnValue=false onselectstart=event.returnValue=false>
tL{~O= "%*lE0Tx -------------------------------------------------------------------------------- Tj5@OcA$ iframe自适应高度 }c ;um <iframe name="pindex" src="index.asp" frameborder=false scrolling="auto" width="100%" height="100%" frameborder=no onload="document.all['pindex'].style.height=pindex.document.body.scrollHeight" ></iframe> 5C1Rub) -------------------------------------------------------------------------------- @H0%N53nE IE地址栏前换成自己的图标&可以在收藏夹中显示出你的图标 3Lki7QW` <link rel="Shortcut Icon" href="favicon.ico"> A5<Z&Y[ <link rel="Bookmark" href="favicon.ico"> oh0|2IrM -------------------------------------------------------------------------------- EZQ+HECpK 字号缩放 l~TIFmHkh% 越来越多的人长时间的泡网,眼镜的普及率也越来越高,让文字大点,让更多的用户看的更清楚。 ^@L
l(? <script type="text/javascript"> p]z54 ~ function doZoom(size) 'O2#1SWe {document.getElementById('zoom').style.fontSize=size+'px';} 9$V_=Bo </script> kJi&9
<span id="zoom">需要指定大小的文字</span> <` j
[;>O <a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a> vs)I pV( -------------------------------------------------------------------------------- m2q;^o:J select挡住div的解决方法 U"y'Kd 在div里加入下面的代码,根据需要调整就可以了。 6(^Upk=59 <iframe src="javascript:false" scrolling="no" frameborder="0" style="z-index:-1;position:absolute; top:5px; left:2px;width:168;height:100px;"> %^?3s5PXD </iframe> dFP-(dX# T~~[a|bLa -------------------------------------------------------------------------------- 4IP\iw#w iframe(嵌入式帧)自适应高度 @S"pJeP/f 填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。对跨域引用有权限问题,请查阅其他资料。 x #X#V\w= <iframe name="guestbook" src="gbook/index.asp" scrolling=no width="100%" height="100%" frameborder=no onload="document.all['guestbook'].style.height=guestbook.document.body.scrollHeight"></iframe> g[wP!y%V
--------------------------------------------------------------------------------
J"Y 跳转菜单新窗口 g t^]32$ <select name="select" onchange="window.open(this.options[this.selectedIndex].value)"> ?F87C[o <option value="http://www.microsoft.com/ie"> Internet Explorer</option> 5} MlZp <option value="http://www.microsoft.com"> Microsoft Home</option> 1;Wkt9]9 <option value="http://msdn.microsoft.com"> Developer Network</option> C*EhexK,} </select> N5f0|U& -------------------------------------------------------------------------------- f05"3L: flash透明选项 \at-"[. <param name="wmode" value="transparent"> (o*e<y,}W -------------------------------------------------------------------------------- o,CA;_ 添加到收藏夹和设为首页 GcZM+ c 添加到收藏夹: Z[})40[M <a href="javascript:window.external.addFavorite('http://链接','说明');">添加到收藏夹</a> A{4G@k+#d 设为首页: `CAG8D <a href=# onclick=this.style.behavior='url(#default#homepage)';this.setHomePage ('http://链接');>设为首页</a> %
UW=: -------------------------------------------------------------------------------- N#RD:"RS! 记录并显示网页的最后修改时间 7wiK.99 <script language=JavaScript> nszpG1U: document.write("最后更新时间: " + document.lastModified + "") ~+pg^en </script> !B [1zE -------------------------------------------------------------------------------- qeQC&U
y; 节日倒计时 I;kf
#nvao <Script Language="JavaScript"> Wj&<"Z6'm( var timedate= new Date("October 1,2002"); ^i{,z*vi var times= "国庆节"; :S QDqG var now = new Date(); ,_.@l+BM. var date = timedate.getTime() - now.getTime(); u;+%Qh var time = Math.floor(date / (1000 * 60 * 60 * 24)); tk`: CT
* if (time >= 0) O%YjWb document.write( "现在离"+times+"还有: "+time +"天") _L*f8e8 </Script> gq
H`GI --------------------------------------------------------------------------------
I6K7!+;2 加在HEAD里 Ff[H>Lp~ 禁止缓存 sT
d}cP
<meta http-equiv="Expires" CONTENT="0"> Jq#[uX <meta http-equiv="Cache-Control" CONTENT="no-cache"> 3xBN10R# <meta http-equiv="Pragma" CONTENT="no-cache"> b%3Q$wIJ6 e.h~[^zg -------------------------------------------------------------------------------- =RQ )$ % 让IFRAME框架内的文档的背景透明 hX0RET <iframe src="about:<body style='background:transparent'>" allowtransparency></iframe> qzz[y#q( -------------------------------------------------------------------------------- hA@zoIoe 打开窗口即最大化 z8g=;>< <script language="JavaScript"> W=~id"XtJ <!-- Begin ov1Wr
#s self.moveTo(0,0) e-~hS6p( self.resizeTo(screen.availWidth,screen.availHeight) gr
GhN q // End --> ?x:m;z/ </script> j -#E?&2 -------------------------------------------------------------------------------- /^d. &@* 加入背景音乐 NI^{$QMj <bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE M#ZT2~+CT <embed src="music.mid" autostart="true" loop="true" hidden="true"> 对Netscape ,IE 都适用 6e*%\2UA -------------------------------------------------------------------------------- 3*G5F}7%= 滚动 HB%K|&!+ <marquee direction=up height=146 onmouseout=start() onmouseover=stop() scrollAmount=2>滚动信息 _jW>dU^B </marquee> u',b1 3g( -------------------------------------------------------------------------------- Hyf"iYv+ 防止点击空链接时,页面往往重置到页首端 D2{L= 代码“javascript:void(null)”代替原来的“#”标记 I<sfN'FpT B4@fY AHq M7+r9 lHcA j{6 ]{<saAmJC 3+e4e Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=648447 |
|