0
Each time the user clicked on the button, I would like you to save the information to a localStorage
different and tried to do with for
, and increment 1 every time you click the button, like this:
for(int i=0; i<10; i++) {
localStorage.setItem('modeloProduto'+i, $('.divProdCarrinho').html());
var teste = localStorage.getItem('modeloProduto');
}
then I would be modelProduct, modelProduct, etc..
It is possible?
yes it is possible, but not the way you are doing it. Recovery also cannot be done like this, what is the reason for it ... a Shopping Cart?
– novic
Yes, that’s the point.
– Weslley Fillipe