阿七
级别: 未验证会员
精华:
0
发帖: 909
威望: 0 点
金钱: 2161 RMB
贡献值: 0 点
在线时间:512(小时)
注册时间:2006-03-29
最后登录:2008-08-07
|
HTML常用代码
HTML常用代码 ZJjm r,1 uxW<Eh4H* 来自:http://blog.csdn.net/softj博客 !]z4'* )W oPF
n`8dQ 控制横向和纵向滚动条的显隐? 1w 9zl} <body style="overflow-y:hidden"> 去掉x轴 M^/ZpKeT" <body style="overflow-x:hidden"> 去掉y轴 `2G%&R,k"D <body scroll="no">不显 u6*0%
Km *Oh]I|? Tx$bg( 9*[!ux7h -------------------------------------------------------------------------------- Xh*NuHH 表格变色 msZ3%L <TD onmouseover="this.style.backgroundColor='#FFFFFF'" ]_! .xx> onmouseout="this.style.backgroundColor=''" 9%?a\#C style="CURSOR: hand"> 90a!_8o -------------------------------------------------------------------------------- VzuU0 禁止复制,鼠标拖动选取 >ZnnGX6$( <body ondragstart=window.event.returnValue=false oncontextmenu=window.event.returnValue=false onselectstart=event.returnValue=false> ,Y0qGsV rJCu6
-------------------------------------------------------------------------------- Y\9zjewc iframe自适应高度 4 :M}Vz- <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> %$+bO/f -------------------------------------------------------------------------------- BvpUcICJ IE地址栏前换成自己的图标&可以在收藏夹中显示出你的图标 %VO>6iVn <link rel="Shortcut Icon" href="favicon.ico"> ,y[w`Q\ <link rel="Bookmark" href="favicon.ico"> Vx=tP.BO] -------------------------------------------------------------------------------- ##yH*{/& 字号缩放 D'"l%p 越来越多的人长时间的泡网,眼镜的普及率也越来越高,让文字大点,让更多的用户看的更清楚。 $gaGaB <script type="text/javascript"> HurF4IsHk function doZoom(size) aj$&~-/
R {document.getElementById('zoom').style.fontSize=size+'px';} :}ZY*ind </script>
y7.oy" <span id="zoom">需要指定大小的文字</span> NrfAr}v'E <a href="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)">小</a> Jr,**,wA -------------------------------------------------------------------------------- Ihx[S!: select挡住div的解决方法 5DVSaI$ = 在div里加入下面的代码,根据需要调整就可以了。 'OsRQ)E <iframe src="javascript:false" scrolling="no" frameborder="0" style="z-index:-1;position:absolute; top:5px; left:2px;width:168;height:100px;"> CWS]821; </iframe> WTu1t] FtybF -------------------------------------------------------------------------------- Kd7 Lpw1u] iframe(嵌入式帧)自适应高度 )S|&3\ 填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。对跨域引用有权限问题,请查阅其他资料。 9mB] \{^ <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> C$`^(?iO/ -------------------------------------------------------------------------------- H8qWY"<Vd 跳转菜单新窗口 O5A]{W <select name="select" onchange="window.open(this.options[this.selectedIndex].value)"> gmtS3, <option value="http://www.microsoft.com/ie"> Internet Explorer</option> Ej$oRo{IG <option value="http://www.microsoft.com"> Microsoft Home</option>
O]Q8&( <option value="http://msdn.microsoft.com"> Developer Network</option>
4\14HcTcK </select> 8D`TN8[W -------------------------------------------------------------------------------- sJm v{wM flash透明选项 <E7y:%L[Go <param name="wmode" value="transparent"> c"NGE -------------------------------------------------------------------------------- 0MN)Z(Sa 添加到收藏夹和设为首页 Lc f] 添加到收藏夹: z=qxZuFkDs <a href="javascript:window.external.addFavorite('http://链接','说明');">添加到收藏夹</a> ?
)e6:T( 设为首页: *N%)+-
<a href=# onclick=this.style.behavior='url(#default#homepage)';this.setHomePage ('http://链接');>设为首页</a> /5Xt<7vm8 -------------------------------------------------------------------------------- Q57Z~EsF 记录并显示网页的最后修改时间 K(_8oB784 <script language=JavaScript> j +Ro? document.write("最后更新时间: " + document.lastModified + "") u\=yY. </script> %`]fZr A]# -------------------------------------------------------------------------------- /rv=mlpRL 节日倒计时 O,0j
+1? <Script Language="JavaScript"> &Pgk$e%> var timedate= new Date("October 1,2002"); 36yIfC, var times= "国庆节"; r\m2Oo)] var now = new Date(); {\ogw
0X var date = timedate.getTime() - now.getTime(); 'PdUSv|lH var time = Math.floor(date / (1000 * 60 * 60 * 24)); ='fN
xabB if (time >= 0) ]?~[!&h document.write( "现在离"+times+"还有: "+time +"天") [k7 ;^A5/ </Script> y_{v&AGmgm -------------------------------------------------------------------------------- PfJfa/#pA 加在HEAD里 L7s
_3\ 禁止缓存 64f6D"." <meta http-equiv="Expires" CONTENT="0"> q #X[oVq <meta http-equiv="Cache-Control" CONTENT="no-cache">
8V+ <meta http-equiv="Pragma" CONTENT="no-cache"> {0Ej*% &F|Wk,y -------------------------------------------------------------------------------- fx/If 让IFRAME框架内的文档的背景透明 wO"ezQ <iframe src="about:<body style='background:transparent'>" allowtransparency></iframe> 8PvO_Gz5 -------------------------------------------------------------------------------- ~{!,ZnO* 打开窗口即最大化 Ms=11C <script language="JavaScript"> I9kBe}g3 <!-- Begin ;;n=(cM|z self.moveTo(0,0) )Tad]Hd"W self.resizeTo(screen.availWidth,screen.availHeight) &Y$)s<u8. // End --> <"x *ZT </script> ]C$$Cx)Ex -------------------------------------------------------------------------------- vjYG>YhV 加入背景音乐 u&$1XZ!es <bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE & | |