gxhpersonal / gxhpersonal.github.io

Wojsdm Stay Star Don't miss
2 stars 0 forks source link

other | blog station #34

Open gxhpersonal opened 5 years ago

gxhpersonal commented 5 years ago

http://www.guoxh.com/blog/2016/12/26/%E5%85%B6%E4%BB%96/

如何判断object是数组类型?1、从原型入手,Array.prototype.isPrototypeOf(obj);2.Array.isArray()方法。例:Array.isArray([1, 2, 3]); // true 精确获取页面元素位置的方式有哪些12345var X= this.getBoundingClientRect().left;var Y =this.getBoundin