阿七
级别: 未验证会员
精华:
0
发帖: 909
威望: 0 点
金钱: 2161 RMB
贡献值: 0 点
在线时间:512(小时)
注册时间:2006-03-29
最后登录:2008-08-07
|
HTML常用代码
HTML常用代码 c9|I4=_K jXtLo,km 来自:http://blog.csdn.net/softj博客 O4n8MM|` \ x:_*`fU 控制横向和纵向滚动条的显隐? SK}HX
G{? <body style="overflow-y:hidden"> 去掉x轴 > e;]mU`, <body style="overflow-x:hidden"> 去掉y轴 ]gEu.Nth` <body scroll="no">不显 G;Us-IRZ 9*f2b.Aj <
rv1IJ p?_'|#tz -------------------------------------------------------------------------------- g<0w/n!jmC 表格变色 t
CkoYrvT <TD onmouseover="this.style.backgroundColor='#FFFFFF'" )H.ubM1 onmouseout="this.style.backgroundColor=''" }k4` style="CURSOR: hand"> t*eleNYeS~ -------------------------------------------------------------------------------- S$Ns8= 禁止复制,鼠标拖动选取 2Zv,K- G <body ondragstart=window.event.returnValue=false oncontextmenu=window.event.returnValue=false onselectstart=event.returnValue=false> (N&k}CO]W .ruqRGe/ -------------------------------------------------------------------------------- V]+o)A$ iframe自适应高度 2O}s*C$Xav <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> N0
2zPC
8 -------------------------------------------------------------------------------- _%AJmt} IE地址栏前换成自己的图标&可以在收藏夹中显示出你的图标 5d)'`hACe <link rel="Shortcut Icon" href="favicon.ico"> QwKky ^A <link rel="Bookmark" href="favicon.ico"> Ak<IHp^Q -------------------------------------------------------------------------------- COxZ
Q 字号缩放 7I @9v=xV 越来越多的人长时间的泡网,眼镜的普及率也越来越高,让文字大点,让更多的用户看的更清楚。 kKFuTem_3 <script type="text/javascript"> 6Cop#kW# function doZoom(size) LAu+{'O\ {document.getElementById('zoom').style.fontSize=size+'px';} *DPTkMQN </script> w>/pQ6=OFR <span id="zoom">需要指定大小的文字</span> )]0[`iLe <a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a> n $D}0wSM/ -------------------------------------------------------------------------------- ZmYa.4'L select挡住div的解决方法 KxgR5#:i" 在div里加入下面的代码,根据需要调整就可以了。 9.MGH2^L? <iframe src="javascript:false" scrolling="no" frameborder="0" style="z-index:-1;position:absolute; top:5px; left:2px;width:168;height:100px;"> 5 b#"
G" </iframe> 5VoOJ_hq 9;xL!cy -------------------------------------------------------------------------------- D>"{H7mY iframe(嵌入式帧)自适应高度 LB64W ;#h 填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。对跨域引用有权限问题,请查阅其他资料。 TQbFI;\ <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> q~:'R
-------------------------------------------------------------------------------- z9);e8ck 跳转菜单新窗口 k:+)$[t7 <select name="select" onchange="window.open(this.options[this.selectedIndex].value)"> 2y
.-4?e <option value="http://www.microsoft.com/ie"> Internet Explorer</option> C&d"#I <option value="http://www.microsoft.com"> Microsoft Home</option> ^V0{Ew/x <option value="http://msdn.microsoft.com"> Developer Network</option> 4E>/*F! </select> f@xfb
ie! -------------------------------------------------------------------------------- ,nu7r1} flash透明选项 GqK&'c <param name="wmode" value="transparent"> *nUpO] -------------------------------------------------------------------------------- I vl^,{4 添加到收藏夹和设为首页 6UzT]" LR; 添加到收藏夹: p*W ZY=Q <a href="javascript:window.external.addFavorite('http://链接','说明');">添加到收藏夹</a> %\zCOfN 设为首页: V[M$o <a href=# onclick=this.style.behavior='url(#default#homepage)';this.setHomePage ('http://链接');>设为首页</a> *l'$pJ X -------------------------------------------------------------------------------- uB#B\i 记录并显示网页的最后修改时间 yM#trqv5 <script language=JavaScript> J ]l@ r document.write("最后更新时间: " + document.lastModified + "") Z$m2rZ# </script> p7=^m>Z6 -------------------------------------------------------------------------------- XL&eJ
节日倒计时 Kg0\Pvg8?T <Script Language="JavaScript"> K&P{2Hndr var timedate= new Date("October 1,2002"); d# ?*62 var times= "国庆节"; Z We$(? var now = new Date(); O/r<VTOp var date = timedate.getTime() - now.getTime(); JA(q>>4 var time = Math.floor(date / (1000 * 60 * 60 * 24)); q@"4Rbu6 if (time >= 0) n,'AFb4AF document.write( "现在离"+times+"还有: "+time +"天") XxU}|jTO# </Script> {Ll8@'5 -------------------------------------------------------------------------------- =
Ow&UI 加在HEAD里 1Y0oo jD 禁止缓存 UY& W] <meta http-equiv="Expires" CONTENT="0"> Z5^UF2`Q <meta http-equiv="Cache-Control" CONTENT="no-cache"> c+M@{EbuN <meta http-equiv="Pragma" CONTENT="no-cache"> G,*
uj0g G u I sM -------------------------------------------------------------------------------- Rl!WH%;c[X 让IFRAME框架内的文档的背景透明 MZF ;k$R <iframe src="about:<body style='background:transparent'>" allowtransparency></iframe> QO^X7A"?X -------------------------------------------------------------------------------- ",@g 打开窗口即最大化 yBjWPx? <script language="JavaScript"> X)+sHcE~# <!-- Begin lGgKzi9VD self.moveTo(0,0) <NsT[r~C self.resizeTo(screen.availWidth,screen.availHeight) KD*4n'm!> // End --> qUg4-Z4 </script> )_ u'k / -------------------------------------------------------------------------------- kpUU
'7Q 加入背景音乐 bW3o%srxa <bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE
';V+~pi
<embed src="music.mid" autostart="true" loop="true" hidden="true"> 对Netscape ,IE 都适用 "Jd1&FsCwX -------------------------------------------------------------------------------- c?Qg:yU 滚动 ?P]md9$(+e <marquee direction=up height=146 onmouseout=start() onmouseover=stop() scrollAmount=2>滚动信息 C#0Wo </marquee> 5X-(@GwN -------------------------------------------------------------------------------- <K'gvMG[ 防止点击空链接时,页面往往重置到页首端 @/iLC6QF 代码“javascript:void(null)”代替原来的“#”标记 9q{dRS[A 6w,xb&S :gtwvM7/B _m-r}9au
R/|o?qTrj uuB\~ #?T Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=648447
|
|
[楼 主]
|
Posted: 2006-04-03 17:04 |
| |