You can
store the value in memory, using JS
var arr = [];
arr.push(your_value);
- keep creating new attribute/values in the dom using JS
- pass the value from page to page through the query string
- store the value in a cookie to be retrieved again
- store the value on the server (in a file/db) to retrieve again
Note:
Options 3 and 5 are only meaningful if you want to go to another page (on the site).
Options 4 and 5 are good if you want to close the browser and retrieve that info at a later point.