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 localStorage

My < B> HTML code:

  input id = "login name" />  

Please tell me if you want to work with local storage Some additional information is required.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -