摘要: 1.获取元素坐标var getPos:function(o){//取元素坐标 var x = 0, y = 0; do{ x += o.offsetLeft; y += o.offsetTop; }while(o=o.offsetParent); return {'x':x,'y':y};}2.获取当前script文件的路径var strJsPath='';(function(){ try { throw Error("获取路径") }catch(ex){ if(ex.fileName)//Firefo... 阅读全文
posted @ 2011-09-16 10:13 seamar 阅读(1266) 评论(0) 推荐(0) 编辑