摘要: 使用setTimeout(),clearTimeout()延时执行函数、清除函数的延迟执行。必须放到函数里面。例如://setTimeout<h1 id="output" ></h1><script type="text/javascript">var c=10;(function (){if(c){setTimeout(arguments.callee,1000)} document.getElementById("output").innerHTML=c;c--;})()</script& 阅读全文
posted @ 2012-04-25 16:44 闫森 阅读(177) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript">//数值与字符串相加var a=5,b=2,c="4";document.write(a+c+"<br/>");//数值与字符串相加 54document.write(a+parseFloat(c)+"<br/>");//c通过parseFloat()方法转化为字符串 9document.write(a+(c-0)+"<br/>");//字符串转化为数值然后再相加 9document.w 阅读全文
posted @ 2012-03-26 14:53 闫森 阅读(766) 评论(1) 推荐(1) 编辑
摘要: 大家有没有遇到过FLASH的层级很高的问题。导致直接挡住下面的层,也会挡住弹出层。无论怎么设置z-index都无动于衷。一.IE浏览器下可用<param name=”wmode” value=”transparent” />firefox下可用<embed src=”YourFlash.swf” wmode=”transparent” … ></embed>二.还有种方法是iframe!缺点是影响网站性能!建议万不得已再用 阅读全文
posted @ 2012-03-13 10:33 闫森 阅读(355) 评论(0) 推荐(0) 编辑
摘要: #box{ width:500px;height:400px; text-align:center; border:1px solid #d3d3d3;background:#fff; /* 兼容标准浏览器 */ display: table-cell; vertical-align:middle; /* 兼容IE6/IE7 */ *display:block; *font-size:349px; /* 字体大小约为容器高度的0.873倍 400*0.873 = 349 */ *font-family:Arial; /* 防止非utf-8引起的hack失效问题,如gbk编码 */}#... 阅读全文
posted @ 2012-03-13 10:32 闫森 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1、<a href=”#” title=”aTitle”><img src=”icon.png” border=”0″ alt=”alt alt” title=”imgTitle” /></a>imgTitle>aTitle2、<a href=”#” title=”aTitle”><img src=”icon.png” border=”0″ alt=”alt alt” /></a>FF、opera、safair、chrome、IE8、IE9、360(3.6.1)、世界之窗 (3.3.0) aTitle> alt 阅读全文
posted @ 2012-03-13 10:28 闫森 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 首先这个方法摘自:http://lzlu.com/lab/loader/谢谢作者。拿来和大家一起分享下。兼容性已测试。代码不贴了。自己点击查看 阅读全文
posted @ 2012-03-09 16:44 闫森 阅读(135) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE HTML><html lang="zh-cn"><head><meta charset="utf-8" /><meta name="keywords" content="" /><meta name="description" content="" /><title>iframe loading 效果</title><link rel="styl 阅读全文
posted @ 2012-03-09 16:36 闫森 阅读(870) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE HTML><html lang="zh-cn"><head><meta charset="gb2312" /><meta name="keywords" content="" /><meta name="description" content="" /><title>卷动式新闻广告牌</title><style type="text/css&q 阅读全文
posted @ 2012-03-09 16:23 闫森 阅读(134) 评论(0) 推荐(0) 编辑