Advertisement
Lauda

Untitled

Jun 27th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. $(document).ready(function(){
  3.     $("#btn_1").click(function() {
  4.         $.post("${pageContext.request.contextPath}/LoginServlet",
  5.                 {
  6.                     jsonData:JSON.stringify({
  7.                         username:$("input#username").val(),
  8.                         password:$("input#password").val()
  9.                     })
  10.                 },
  11.                 function(data,status){
  12.                     alert("Data: " + data + "\nStatus: " + status);
  13.                       }
  14.  
  15.         );
  16.     });
  17. });
  18. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement