Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uncaught SyntaxError: Unexpected token u in JSON at position 0
- at JSON.parse (<anonymous>)
- at buscaConta (principal.html:114)
- at HTMLButtonElement.onclick (principal.html:99)
- buscaConta @ principal.html:114
- onclick @ principal.html:99
- div class="formu" id="formularioDeIdent" style="display:none">
- <p class="textoForm"> Informe seu nome: </p>
- <form>
- <div>
- <label for="nome"> Nome: </label>
- <input type="text" id="nome" />
- </div>
- <div class="centralizar">
- <br><br>
- <button class="botaoPequeno" type="button" onClick="buscaConta()">Buscar sua conta</button>
- </div>
- <br><br>
- <div class="centralizar" style="display:none">
- <br><br>
- <button class="botaoPequeno" type="button" onClick="mudaMenu('formularioDeIdent', 'menu2')">Prosseguir</button>
- </div>
- </form>
- </div>
- <script>
- function buscaConta(){
- var name = document.getElementById('nome');
- //O ERRO OCORRE NA LINHA ABAIXO:
- console.log(JSON.parse(localStorage[nome.value]).valueOf());
- //console.log(oCliente);
- }
- </script>
Add Comment
Please, Sign In to add comment