Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("button").click(function() {
- $.ajax({
- url: 'http://***.com:3000/login',
- data: {
- format: 'json',
- username: $('#username').val(),
- password: $('#password').val()
- },
- error: function() {
- console.log("error");
- alert('FAIL');
- },
- dataType: 'jsonp',
- success: function(data) {
- alert('OK');
- console.log("success");
- },
- type: 'GET'
- });
- })
- res.status(200).send("OK");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement