04 2012 档案

摘要://按键判定;<script type="text/javascript">function keyValue(myEvent){if (document.all)myEvent=event;version=navigator.appVersion;if (version.indexOf("MSIE")==1){ if(myEvent.which==37){alert("你按下的按键代码值为:向左")};if(myEvent.which==39){alert("你按下的按键代码值为:向右")}}else 阅读全文
posted @ 2012-04-26 19:31 闫森 阅读(285) 评论(0) 推荐(0)
摘要:function docMax(name){return Math.max(document.documentElement["client" + name],document.documentElement["scroll" + name],document.documentElement["offset" + name],document.body["scroll" + name], document.body["offset" + name], document.body["cl 阅读全文
posted @ 2012-04-26 19:30 闫森 阅读(162) 评论(0) 推荐(0)
摘要:position:fixed; left:0; bottom:0; z-index:99999;_position:absolute; _top: expression(eval(document.documentElement.scrollTop + (document.documentElement.clientHeight - 38)));opacity:0.7;filter:alpha(opacity=70); 阅读全文
posted @ 2012-04-26 19:29 闫森 阅读(129) 评论(0) 推荐(0)
摘要:使用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 闫森 阅读(188) 评论(0) 推荐(0)