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/>";
        }
    }
share

feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.