Advertisement
Guest User

Untitled

a guest
Jan 30th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $("button").click(function() {
  2. $.ajax({
  3. url: 'http://***.com:3000/login',
  4. data: {
  5. format: 'json',
  6. username: $('#username').val(),
  7. password: $('#password').val()
  8. },
  9. error: function() {
  10. console.log("error");
  11. alert('FAIL');
  12. },
  13. dataType: 'jsonp',
  14. success: function(data) {
  15. alert('OK');
  16. console.log("success");
  17. },
  18. type: 'GET'
  19. });
  20.  
  21.  
  22. })
  23.  
  24. res.status(200).send("OK");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement