Guest User

Untitled

a guest
Jul 11th, 2018
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. var ajax = {
  2. username: 'user',
  3. password: 'pass',
  4. getInfo: function(){
  5. $.ajax({
  6. url: 'post.php',
  7. data: 'username=' + this.username + '&password=' + this.password,
  8. type: 'post',
  9. success: function(data){
  10. if(data){
  11. console.log('true');
  12. }
  13. else{
  14. console.log('false');
  15. }
  16. }
  17. });
  18. }
  19. }
  20.  
  21. ajax.getInfo();
Add Comment
Please, Sign In to add comment