阿七
级别: 未验证会员
精华:
0
发帖: 909
威望: 0 点
金钱: 2161 RMB
贡献值: 0 点
在线时间:512(小时)
注册时间:2006-03-29
最后登录:2008-08-07
|
HTML常用代码
HTML常用代码 #mK?K
+M %zOX/ 来自:http://blog.csdn.net/softj博客 Wo[*P\8 N5Rda2m 控制横向和纵向滚动条的显隐? tP;^;nw <body style="overflow-y:hidden"> 去掉x轴 }W)c-91
<body style="overflow-x:hidden"> 去掉y轴 ]pi8%.d <body scroll="no">不显 n0*a. $&l}
ABn )of?!>'S[ j9XRC9
-------------------------------------------------------------------------------- @ a?^2X^ 表格变色 (ev(~Wc <TD onmouseover="this.style.backgroundColor='#FFFFFF'" ,&X7D] onmouseout="this.style.backgroundColor=''" gfW8s+ style="CURSOR: hand"> ',<Bo{ -------------------------------------------------------------------------------- ~c*$w O\ 禁止复制,鼠标拖动选取 =eNh))] <body ondragstart=window.event.returnValue=false oncontextmenu=window.event.returnValue=false onselectstart=event.returnValue=false> 5u=(zg Hi{1C"% -------------------------------------------------------------------------------- ^3B&E^R iframe自适应高度 vg6'^5S7 <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> D0 f.XWd -------------------------------------------------------------------------------- >#Obhs|S{C IE地址栏前换成自己的图标&可以在收藏夹中显示出你的图标 xpb,Nzwt^ <link rel="Shortcut Icon" href="favicon.ico"> {d%% nK~ <link rel="Bookmark" href="favicon.ico"> ? V0!N; -------------------------------------------------------------------------------- N5SePA\ ,? 字号缩放 { vf"`#Q9 越来越多的人长时间的泡网,眼镜的普及率也越来越高,让文字大点,让更多的用户看的更清楚。 _7#9nJ3| <script type="text/javascript"> #Pf?.NrTn function doZoom(size) 7t@r}rC,K {document.getElementById('zoom').style.fontSize=size+'px';} v%=@_`Ht </script> :&{:$-h! <span id="zoom">需要指定大小的文字</span> {-T}"WHg7 <a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a> DLWG0$#! -------------------------------------------------------------------------------- Ob+Rnfx37 select挡住div的解决方法 :?*|D p1 在div里加入下面的代码,根据需要调整就可以了。 !Rq.L <iframe src="javascript:false" scrolling="no" frameborder="0" style="z-index:-1;position:absolute; top:5px; left:2px;width:168;height:100px;"> gtV^6(Y </iframe> 'K L"i $ e<1 08)] -------------------------------------------------------------------------------- "x+o(jOy iframe(嵌入式帧)自适应高度 3u)NkS= 填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。对跨域引用有权限问题,请查阅其他资料。 N5yt'.d <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> *CIR$sS -------------------------------------------------------------------------------- eVXlQO 跳转菜单新窗口 &^v5 x" <select name="select" onchange="window.open(this.options[this.selectedIndex].value)"> rkF>c <option value="http://www.microsoft.com/ie"> Internet Explorer</option> 8zMt&5jD <option value="http://www.microsoft.com"> Microsoft Home</option> e;*GbXd| <option value="http://msdn.microsoft.com"> Developer Network</option> 6ka,
FjJ\ </select> xzZ2?zWi -------------------------------------------------------------------------------- fAMk<? flash透明选项 (mNNTMe <param name="wmode" value="transparent"> 4
Wb^$i! -------------------------------------------------------------------------------- ho'Ihep,L 添加到收藏夹和设为首页 .+@;gVZx1 添加到收藏夹: gPW% *|D, <a href="javascript:window.external.addFavorite('http://链接','说明');">添加到收藏夹</a> RjcU0$Hi 设为首页: j$<sq <a href=# onclick=this.style.behavior='url(#default#homepage)';this.setHomePage ('http://链接');>设为首页</a> y
DE0qUO -------------------------------------------------------------------------------- 5 $vUdDTg 记录并显示网页的最后修改时间 Q{:5gh <script language=JavaScript> (}#8$ ) document.write("最后更新时间: " + document.lastModified + "") }Ai_peO0a </script> I*SrKZb -------------------------------------------------------------------------------- 'o!{YLJ fM 节日倒计时 o#^(mGj_. <Script Language="JavaScript"> 6H #4iMeh var timedate= new Date("October 1,2002"); M3 TsalF var times= "国庆节"; TI<?h(*R_ var now = new Date(); xsO
"H8 var date = timedate.getTime() - now.getTime(); j6JK4{ var time = Math.floor(date / (1000 * 60 * 60 * 24)); \U?$ r[P if (time >= 0) YcmLc)a7 document.write( "现在离"+times+"还有: "+time +"天") eXYf"hU, </Script> 7~ I*u6zY -------------------------------------------------------------------------------- k$ORV U 加在HEAD里 V?zCON 禁止缓存 Rt9S <meta http-equiv="Expires" CONTENT="0"> n|M~C\* <meta http-equiv="Cache-Control" CONTENT="no-cache"> S=@bb$4-T <meta http-equiv="Pragma" CONTENT="no-cache"> #3_t}<fX B*3<(eI -------------------------------------------------------------------------------- ,8`CsY^1 让IFRAME框架内的文档的背景透明 Gpb<,v_3 <iframe src="about:<body style='background:transparent'>" allowtransparency></iframe> KB$SB25m --------------------------------------------------------------------------------
O!U8"Yr$ 打开窗口即最大化 DCheG7lo{ <script language="JavaScript"> u= =`]\_@ <!-- Begin Aw)I:d7F self.moveTo(0,0) O}3|U
I!` self.resizeTo(screen.availWidth,screen.availHeight) A?+0Ce&qL // End --> |6O7_U#q </script> <C <z#M'` -------------------------------------------------------------------------------- 8-&c%h
1 加入背景音乐 "sU jJ| <bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE &`%J1[dy <embed src="music.mid" autostart="true" loop="true" hidden="true"> 对Netscape ,IE 都适用 }`uFLBG3 -------------------------------------------------------------------------------- ?_t_rF(?6 滚动 HPc~wX <marquee direction=up height=146 onmouseout=start() onmouseover=stop() scrollAmount=2>滚动信息 k~XDwmt; </marquee> bamQ]>0|>! -------------------------------------------------------------------------------- j_{f(.5 防止点击空链接时,页面往往重置到页首端 ;-Ki
`x.oJ 代码“javascript:void(null)”代替原来的“#”标记 WYm
<_1 j@s* hZ^J+ mfx-Ja_a
@gnLY 'mTQ=1 ~5>k_\G8 Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=648447
|
|
[楼 主]
|
Posted: 2006-04-03 17:04 |
| |