Guest User

Untitled

a guest
Feb 22nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. $.ajax({
  2. url: "restrict/checkUser.php",
  3. type: "POST",
  4. cache: false,
  5. dataType : 'json' ,/*adiciona o tipo de retorno*/
  6. error: function(){
  7. alert('Erro ao Tentar ação.');
  8. },
  9. success: function (data) {
  10. alert('listou');
  11.  
  12. console.log(data[0].crs_id);
  13. console.log(data[1].crs_id);
  14. console.log(data[2].crs_id);
  15. console.log(data[3].crs_id);
  16. }
  17. });
  18.  
  19. $.ajax({
  20. url: "restrict/checkUser.php",
  21. type: "POST",
  22. cache: false,
  23. dataType : 'json' ,/*adiciona o tipo de retorno*/
  24. error: function(){
  25. alert('Erro ao Tentar ação.');
  26. },
  27. success: function (data) {
  28. alert('listou');
  29.  
  30. for (let d of data) {
  31. console.log(d.crs_id);
  32. }
  33. }
  34. });
Add Comment
Please, Sign In to add comment