jquery - Unexpected end of input (javascript and JSON) -
I'm trying to simulate session with javascript. Mostly, the user credentials are saved in local storage and later compared with the array I am getting an unexpected end of input on the on oStoredCredentials = JSON.parse (localStorage.savedCredentials);
line and I do not get the answer. This whole block of code is:
$ (document) .on ("click", ".submitBtnLog", function () { Var sUsername = $ ("# loginName"). Val (); var sPassword = $ ("# LoginPassword") for .val (); for (var i = 0; i & lt; aemployees.length; i ++) {If u name == amp employee [i] .username and password password == one employee [i]. Password) {login = true; var sUsername = aemployees [i] .Username
I have created some simple code for how to do Please tell me if you want to work with local storage Some additional information is required. localStorage
My < B> HTML code:
input id = "login name" />
Comments
Post a Comment