我正在尝试将某些字段推入数组,但是出现此错误
var Add_GasSupply_Detail;
var GasSupplyDetail = [];
Add_GasSupply_Detail = function () {
LPG_Operator = $("#LPG_Operator").val();
LPG_GaS_Supply = $("#LPG_GaS_Supply").val();
LPG_Title = $("#LPG_Title").val();
GasSupplyDetail.push({
LPG_Operator: LPG_Operator,
LPG_GaS_Supply: LPG_GaS_Supply,
LPG_Title: LPG_Title,
});
}
Uncaught TypeError: GasSupplyDetail.push is not a function