摘要: XHtml<img border="0" src="图片路径" onmouseover="imgchange(this,'图片路径')" onmouseout="imgchange(this,'图片路径')" >JSfunction imgchange(s_img,s_scr){ s_img.src=s_scr;} 阅读全文
posted @ 2012-09-20 14:05 hm21 阅读(163) 评论(0) 推荐(0)
摘要: 需要切换的页面body中加<body id="onn_1">,<body id="onn_2">,<body id="onn_3">,<body id="onn_4">,切换的菜单里加<ul> <li><a href=“/” id=“on_1”><span>网站首页</span></a></li> <li><a href=“/About” id=“on_2”>& 阅读全文
posted @ 2012-09-20 14:01 hm21 阅读(3712) 评论(0) 推荐(0)
摘要: CSSbody {behavior:url("hover.htc");hover.htc/*解决ie6.0 的hover兼容问题*/<attach event="ondocumentready" handler="parseStylesheets" /><script>var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,currentSheet, doc = window.document, hoverEvent 阅读全文
posted @ 2012-09-20 13:54 hm21 阅读(168) 评论(0) 推荐(0)
摘要: input:<input name="textfield" type="text" maxlength="20" value="请输入文字.." onfocus="if (value =='请输入文字..'){value =''}" onblur="if (value ==''){value='请输入文字..'}" /><br><br>textarea:<textarea 阅读全文
posted @ 2012-09-20 11:29 hm21 阅读(176) 评论(0) 推荐(0)
摘要: <style>.shadeDivWrap{width:141px; margin:0px 1px; z-index:10; height:72px; padding-top:10px; position:absolute; top:172px;}.shadeDiv{ width:141px; height:72px; background-color:#777777;/*:rgba(0,0,0,0.3);*/ opacity:0.57;filter:alpha(opacity=57); z-index:-1; position:absolute; }.shadeDivWrap p{ 阅读全文
posted @ 2012-09-20 11:20 hm21 阅读(2452) 评论(0) 推荐(0)
摘要: <a href="#" onclick="history.go(0)"><font size=3 color=white>刷新</font></a>1 <input type=button value=刷新 onclick="history.go(0)">2 <input type=button value=刷新 onclick="location.reload()">3 <input type=button value=刷新 oncli 阅读全文
posted @ 2012-09-20 11:12 hm21 阅读(363) 评论(0) 推荐(0)
摘要: 大部分网站均有的区块给出一个命名规范 Page container 页面容器 #container Branding areas 标记(logo)区域 #branding(不要用#header) Navigation(main) 主导航 #nav_main Navigation(sub) 副导航 #nav_sub Navigation(supplementary)支持导航 ... 阅读全文
posted @ 2012-09-20 10:27 hm21 阅读(275) 评论(0) 推荐(0)
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2012-09-20 10:19 hm21 阅读(181) 评论(0) 推荐(0)
摘要: Hhtml<ul id="wenchuan"><li>001</li><li>002</li><li>003</li><li>004</li><li>005</li><li>006</li><li>007</li><li>008</li><li>000</li></ul>JavaScript<script type="te 阅读全文
posted @ 2012-09-20 10:17 hm21 阅读(257) 评论(0) 推荐(0)
摘要: XHtml<label><input type="checkbox" name="abc" onclick="checkall(this.form)" value="checkbox" />全选</label>JavaScript<script language="javascript">function checkall(form) { var c = 'abc'; for(var e = 0; e < form.eleme 阅读全文
posted @ 2012-09-20 10:15 hm21 阅读(132) 评论(0) 推荐(0)
摘要: xhtml<div id="ads"> <div class="block1"> <ul> <li><h3>title</h3></li> <li><a href=""><span class="b1"></span>this is title 1.</a></li> <li><a href=""><span c 阅读全文
posted @ 2012-09-20 10:13 hm21 阅读(466) 评论(0) 推荐(0)
摘要: xhtml<body><span id="boxs"></span><a href="javascript:boxs(1);">点这里测试一下</a></body>CSS<style>*{ padding:0; margin:0; font-size:12px;}/*这里将所有HTML标签的padding和marging以及font属性全部统一*/#bg{background:#000000;opacity: 0.5;-moz-opacity:0.5; filter:al 阅读全文
posted @ 2012-09-20 10:11 hm21 阅读(1249) 评论(0) 推荐(0)
摘要: html代码<div id="box"> <div id="content"> <div id="right">right <br />right</div> <div id="left">left</div> </div></div>Css<style>*{ padding:0; margin:0; font-size:12px; line-height:1.8; font-family:Ver 阅读全文
posted @ 2012-09-20 10:07 hm21 阅读(184) 评论(0) 推荐(0)
摘要: html代码<input type="text" id="testInput" name="testInput" value="4234324234" /><div id="buttonBox"> <button onclick="copy('testInput')">copy</button></div>JS文件<script>function $(id){ return documen 阅读全文
posted @ 2012-09-20 10:05 hm21 阅读(1416) 评论(0) 推荐(0)