摘要:
function getPos(obj){ var l=0; var t=0; while(obj){ l+=obj.offsetLeft; t+=obj.offsetTop; obj=obj.offsetParent; }; return {left:l,top:t};} 用一个例子... 阅读全文
摘要:
function getStyle(obj,name){ return obj.currentStyle?obj.currentstyle[name]:getComputedStyle(obj,false)[name];};function move(obj,json,options){ optio... 阅读全文
摘要:
function rnd(n,m){ return parseInt(Math.random()*(m-n+1)+n);} 阅读全文