0
此代码段是创建新的对象,它工作正常,在其他浏览器IE,但9SCRIPT438:对象不支持属性或方法“创造” - IE9
function Item(no, name, qty, lineNo) {¬
this.no = no;¬
this.name = name;¬
this.qty = qty;¬
this.lineNo = lineNo;¬
}¬
Item.prototype = Object.create(null);¬ // error this line
我怎样才能解决这个问题?
http://stackoverflow.com/questions/2709612/using-object-create-instead-of-new这将帮助你...在某些浏览器中不支持Object.create() – Apurv