摘要: Array.isArray([]); // true// 尝试用一个类似数组的对象去测试Array.isArray({ length: 1, "0": 1, slice: function() {}}); // false//如果你的开发环境不支持ECMAScript5,可以通过Object.prototype.toString()方法来代替。if (typeof Array.isArray === "undefined") { Array.isArray = function(arg) { return Object.prototype.toStrin 阅读全文
posted @ 2013-04-24 10:16 小猩猩君 阅读(156) 评论(0) 推荐(0)