title: Getting textbox's value using jQuery
body: <p>I am creating a login form dynamically, using jQuery and AJAX response. Form is created and displaying properly. But, I'm not able to read the form data.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$(document).ready(function(){
    $('#proper-form').on( 'click', '#submit-button', function() {  // loginForm is submitted
  
  alert ("here");
      var username = $('#email').attr('value'); // get username
      var password = $('#password').attr('value'); // get password
  alert (password);
  alert (username);
  
      // code for form submit using ajax
  
   }); 
  });
  </code></pre>
  
  <p>It's alerting <code>undefined undefined</code> for both username and password.</p>
  
  <p>Can anyone help me in figuring out what's wrong here?</p>