title: javascript - remember user data after loggin in and checkbox selected
body: <p>I'm helping developing improvements on a client website. In one of those improvements, there is the Login form. I want to add a checkbox that when the user logs in after selecting this checkbox, it remember his login data.</p>
  
  <p>The login form I have:</p>
  
  <pre><code>&lt;form id='formLogin' method='post' name='formLogin'&gt; &lt;!-- action="telaInicial"&gt; --&gt;
          &lt;label for="usuario"&gt;{label_index_user}&lt;/label&gt;&lt;input name="usuario" id="usuario" type="text" /&gt;&lt;br /&gt;
          &lt;label for="senha"&gt;{label_index_password}&lt;/label&gt;&lt;input name="senha" id="senha" type="password" maxlength="8" /&gt;&lt;br /&gt;
          &lt;div id="btLogin"&gt;&lt;input type='button' id='entrar' value="{label_index_enviar}"/&gt;&lt;/div&gt;
          &lt;div id="btLogout"&gt;&lt;input type='button' id='deslogar' value="{label_index_sair}"/&gt;&lt;/div&gt;
          &lt;br&gt;&lt;div id="checkLembraDados"&gt;&lt;input type='checkbox' id='lembrar' /&gt;{label_index_lembrardados}&lt;/div&gt;
          &lt;a id="esqueciSenha" href='#' &gt;{label_index_esquecisenha}&lt;/a&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>So I think I need to put on my JS file something like:</p>
  
  <pre><code>$("#lembrar").click(function() {
          if document.getElementById("lembrar").checked = true {
              // CODE FOR REMEMBERING DATA FOR FUTURE LOGINS
          }
      });
  </code></pre>
  
  <p>I don't know if I made myself clear on this question. But I think it can be simple to put on the page.</p>
  
  <p>Thanks for any help.</p>