你好,我需要一些关于 JavaScript 的帮助。
function PricingData(id,method,freq,service,price) {
this.ID=id;
this.PaymentMethod_ID=method;
this.PaymentFrequency_ID=freq;
this.Service_ID=service;
this.Price=price;
}
我需要以这种方式创建一个数组。
var temp=new PricingData[]{new PricingData(1,2,3,4,5),new PricingData(1,2,3,4,5)};
但是这种方式不起作用。我将通过服务器传递数据,因此我更喜欢类似于这样的语法。