items.push(new Item(1, [0, 40], 'asd');
然后访问JQuery的对象变量
var items = [];
function Item(id, position, content) {
this.id = id;
this.position = position;
this.content = content;
}
我创建一个新元素i和通过阵列中的所有项目循环,当调用
item[i].position[0]
我收到错误SCRIPT5007
。在Chrome和FF这工作正常,唯一的问题是与IE。
你在你的循环中放置了一个调试器行吗?这应该会给你更多的信息。 – Mouser
你是通过'http://'还是'file://'打开页面? –
请问您能否添加IE11报告的“SCRIPT5007”的描述? – gaetanoM