I have refereed this question and worked for me: so q1
Now Issue is that I have used JSON.stringify & JSON.parse to store array in localStorage. But when I run the code again and try to use JSON.parse on localStorage nothing get retrived. I dont know whats going wrong.
here is code:
function BankProDisplay() {
var myString = JSON.parse(localStorage['bankpro']);
var mySplitResult = myString.split(",");
for (i = 0; i < mySplitResult.length; i++) {
document.getElementById('bankpro').innerHTML = document.getElementById('bankpro').innerHTML + mySplitResult[i] + "<br/>";
}
}