How to store temporary data at the client-side and then send it to the server

I need to store data temporarily at the client-side to allow users to add, edit or delete items without having to query the server for each of these actions; just when the user finishes adding items and clicks on the Add button, the list is sent to the server to be saved permanently.

This image describes what I want to achieve. Я знаю, что мне нужно использовать массивы в JavaScript, но я не знаю, как создать массив для хранения объектов (в данном случае Деталь , которая содержит: идентификатор, цену и описание).

Надеюсь, вы может мне помочь. Заранее спасибо. PS: I'm using JSP and... sorry for my English

6
задан 2 December 2010 в 04:15
поделиться