我正在定义一个这样的对象:
function Project(Attributes, ProjectWidth, ProjectHeight) {
this.ProjectHeight = ProjectHeight;
this.ProjectWidth = ProjectWidth;
this.ProjectScale = this.GetProjectScale();
this.Attributes = Attributes;
this.currentLayout = '';
this.CreateLayoutArray = function()
{....}
}
然后我尝试创建一个这样的实例:
var newProj = new Project(a,b,c);
但是抛出了这个异常:
Project is not a constructor
有什么问题?我用谷歌搜索了很多,但我仍然无法弄清楚我做错了什么。