-2
我有一個剪裁器插件關於圖像屬性的對象。將屬性追加到剪裁器插件對象
var data = $img.cropper('getData');
//Object {x: 90, y: 60, width: 720, height: 480, rotate: 0…}
現在我需要追加更多的兩個值:
image_identifier = $('.image_identifier').text();
type_identifier = $('.type_identifier').text();
我試過這段代碼:
data.push({'image_identifier':image_identifier, 'type_identifier':type_identifier});
但我正在逐漸:Uncaught TypeError: data.push is not a function