Guest User

Untitled

a guest
Oct 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. var testval = 'test';
  2. function getip(){
  3. $.ajax({
  4. type: "POST",
  5. url: "/php/utils.php",
  6. data: "id=getip",
  7. success: function(data) {
  8. if (data) {
  9. testval = data;
  10. } else {
  11. console.error('undefined');
  12. }
  13. }
  14. });
  15. }
  16. alert(testval);
Add Comment
Please, Sign In to add comment