就是類似這種,點(diǎn)擊按鈕,添加一條新數(shù)據(jù), 現(xiàn)在的問題是,點(diǎn)擊按鈕,數(shù)據(jù)能插入,但是把之前的都覆蓋了,始終就一條 我是用的push()var comment = [];var list = {"goods_id": id, "contents": $scope.val, "point": $scope.haricot_val, "speed_point": $scope.speed_val};comment.push(list);這樣寫,數(shù)據(jù)只有這一條[{"goods_id":9,"contents":"","point":"5"}]想要更多條數(shù)據(jù)。。
js點(diǎn)擊事件在數(shù)組中添加一條新數(shù)據(jù)
九州編程
2018-09-14 10:09:27